[Question]
  [
Given a list of at least two words (made only of lowercase letters), construct and display an ASCII ladder of the words by alternating the direction of writing first to the right, then to the left, relatively to the initial direction from left to right.
When you finish writing a word, change the direction and only then start writing the next word.
If your language doesn't support lists of words, or it's more convenient for you, you can take the input as a string of words, separated by a single space.
Leading and trailing whitespaces are allowed.
`["hello", "world"]` or `"hello world"` 
```
hello
    w
    o
    r
    l 
    d
```
Here we start by writing `hello` and when we come to the next word (or in the case of the input as a string - a space is found), we change the relative direction to the right and continue to write `world`
## Test cases:
```
["another", "test", "string"] or "another test string" ->   
another
      t
      e
      s
      tstring
["programming", "puzzles", "and", "code", "golf"] or "programming puzzles and code golf" ->
programming
          p
          u
          z
          z
          l
          e
          sand
             c
             o
             d
             egolf
["a", "single", "a"] or "a single a" ->
a
s
i
n
g
l
ea
```
## Wining criteria
The shortest code in bytes in every language wins. Don't let be discouraged by the golfing languages!
[Sandbox](https://codegolf.meta.stackexchange.com/a/17694/75681)
  
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 9 bytes
```
Ｆ⮌Ａ«↑⮌ι‖↗
```
[Try it online!](https://tio.run/##NYlBCsMgEADPySvEkwvpB9oX9FaEnkIOYlYjGJWNySGlb9/WQk8zzNjFkM0mMrtMQmk8kDZU91T2qgBAvPruQSFVdX2WQfx/ALj1nUYX0f6WDn6p3/ZmHkdZKHsy6xqSl4OQZT/PiFtTk@YGm2ds9Dk6OU18OeIH "Charcoal – Try It Online") Link is to verbose version of code. Explanation: Works by drawing the text backwards, transposing the canvas after every word. 10 bytes for string input:
```
Ｆ⮌Ｓ≡ι ‖↗←ι
```
[Try it online!](https://tio.run/##DcxLCsMgFEbhcbKKn4wU2g2kKyh0UFK6ADHXBxgVvUkhpWu3jj/O0U4VnVRozaQCsdBBpZK4x7zzi4uPVkgpUT@etYPwEt9x0KoSJkwzFjKBNIv5nRdvHcvbOKxk1B54xrPnnR5k@ALf6ddaLskWtW19jLyfZ6AKFVfotBJsCmZs1yP8AQ "Charcoal – Try It Online") Link is to verbose version of code. Explanation: Draws the text backwards, transposing the canvas for spaces.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~94~~ ~~78~~ 74 bytes
-4 from [Johan du Toit](https://codegolf.stackexchange.com/questions/186005/construct-a-word-ladder?answertab=votes#comment445975_186015)
```
o,f;g(int*s){for(o=f=0;*s;s++)*s<33?f=!f:printf("\n%*c"+!f,f*(o+=!f),*s);}
```
[Try it online!](https://tio.run/##ZYxBCsIwEEX3nmIMCElaQejOWLyAR3AT0kwspJmSSREqnr1Gt@4@/73/3TE4t23UoglyTEWzeiFlST32J6PZcNMozZeuu2K/x/Ocq4RS3NNBO9HssUUtqalItXVr3ttkxyTVaxfkTTx8jARPynEQysxLYSlq@DGbqDx8huK5AJf6G/6cOVPIdpoqg3lZ1@gZbBrA0eAhUMT/V@AqRw/227y3Dw "C (gcc) – Try It Online")
Prints the ladder, one character (of the input) at a time. Takes a space-separated string of words.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~19~~ 16 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
€θ¨õšøíJD€gs24SΛ
```
-3 bytes thanks to *@Emigna*.
[Try it online.](https://tio.run/##yy9OTMpM/f//UdOaczsOrTi89ejCwzsOr/VyAQqkFxuZBJ@b/f9/tFJBUX56UWJubmZeupKOUkFpVVVOajGQlZiXAiST81NSgVR6fk6aUiwA)
**General explanation:**
Just like [*@Emigna*'s 05AB1E answer](https://codegolf.stackexchange.com/a/186006/52210) (make sure to upvote him btw!!), I use [the Canvas builtin `Λ`](https://codegolf.stackexchange.com/a/175520/52210).
The options I use are different however (which is why my answer is longer..):
* `b` (the strings to print): I leave the first string in the list unchanged, and add the trailing character to each next string in the list. For example `["abc","def","ghi","jklmno"]` would become `["abc","cdef","fghi","ijklmno"]`.
* `a` (the sizes of the lines): This would be equal to these strings, so `[3,4,4,7]` with the example above.
* `c` (the direction to print in): `[2,4]`, which would map to `[→,↓,→,↓,→,↓,...]`
So the example above would step-by-step do the following:
1. Draw `abc` in direction `2`/`→`.
2. Draw `cdef` in direction `4`/`↓` (where the first character overlaps with the last character, which is why we had to modify the list like this)
3. Draw `fghi` in direction `2`/`→` again (also with overlap of trailing/leading characters)
4. Draw `ijklmno` in direction `4`/`↓` again (also with overlap)
5. Output the result of the drawn Canvas immediately to STDOUT
**Code explanation:**
```
€θ                # Only leave the last characters in the (implicit) input-list
  ¨               # Remove the last one
   õš             # And prepend an empty string "" instead
     ø            # Create pairs with the (implicit) input-list
      í           # Reverse each pair
       J          # And then join each pair together to single strings
        D€g       # Get the length of each string (without popping by duplicating first)
           s      # Swap so the lengths are before the strings
            24S   # Push [2,4]
               Λ  # Use the Canvas builtin (which outputs immediately implicitly)
```
[Answer]
# [Canvas](https://github.com/dzaima/Canvas), ~~17~~ ~~12~~ ~~11~~ 10 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
```
ø⁸⇵｛⟳Ｋ└×∔⤢
```
[Try it here!](https://dzaima.github.io/Canvas/?u=JUY4JXUyMDc4JXUyMUY1JXVGRjVCJXUyN0YzJXVGRjJCJXUyNTE0JUQ3JXUyMjE0JXUyOTIy,i=JTVCJTIyYW5vXy8lM0V0aGVyJTIyJTJDJTIwJTIydGVfLyUzRXN0JTIyJTJDJTIwJTIyc3RyXy8lM0VpbmclMjIlMkMlMjAlMjIlMjElMjElMjIlNUQ_,v=8)
Explanation:
```
ø⁸⇵{⟳K└×∔⤢  full program taking array as input (loaded with ⁸)
ø         push an empty canvas               ["test", "str"], ""
 ⁸⇵{      for each input word, in reverse:   "str", "test" (showing 2nd iter)
    ⟳       rotate the word vertically       "str", "t¶e¶s¶t"
     K      pop off the last letter          "str", "t¶e¶s", "t"
      └     swap the two items below top     "t¶e¶s", "str", "t"
       ×    prepend                          "t¶e¶s", "tstr"
        ∔   vertically append                "t¶e¶s¶tstr"
         ⤢  transpose the canvas             "test
                                                 s
                                                 t
                                                 r"
```
[Answer]
# JavaScript (ES8), ~~91 79~~ 77 bytes
Takes input as an array of words.
```
a=>a.map((s,i)=>i&1?[...s].join(p):s+=p+=''.padEnd(s.length-!i),p=`
`).join``
```
[Try it online!](https://tio.run/##fY8xbsMwDEX3nML1UEuwI6BrAaVTT5EGMGHJsgKaFES1BXJ51/LYIdPj8P7/4B1@QKYcUzkTO7/NdgN7AbNCUkqGqO0lvr59XI0xcjN3jqSSfpfept52nUngPskpMegplOX8EvWQ7Hga9eGO4zYxCaM3yEHN6touHpHboWl/OaNrb7rpm@6LOn36bwJxWXyubvFSKqXkSOFZKGUOGda1ansgfT8e6KWeQK5i2r@sDIzz0/Vjb6/BQ4fd1dsf "JavaScript (Node.js) – Try It Online")
### Commented
```
a =>                 // a[] = input array
  a.map((s, i) =>    // for each word s at position i in a[]:
    i & 1 ?          //   if this is a vertical word:
      [...s].join(p) //     split s and join it with p
    :                //   else:
      s +=           //     add to s:
        p +=         //       add to p:
          ''.padEnd( //         as many spaces
            s.length //         as there are letters in s
            - !i     //         minus 1 if this is the 1st word (because it's not connected
          ),         //         with the last letter of the previous vertical word)
    p = `\n`         //   start with p = linefeed
  ).join``           // end of map(); join everything
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~14~~ 13 bytes
Saved 1 byte thanks to *Grimy*
```
€ðÀD€g>sŽ9÷SΛ
```
[Try it online!](https://tio.run/##yy9OTMpM/f//UdOawxsON7gA6XS74qN7LQ9vDz43@///aKWCovz0osTc3My8dCUdpYLSqqqc1GIgKzEvBUgm56ekAqn0/Jw0pVgA "05AB1E – Try It Online")
**Explanation**
```
                 # example input ["Hello", "World"]
€ðÀ              # push a space after each word
                 # STACK: ["Hello"," ","World"," "]
   D             # duplicate
    €g>          # get the length of each word in the copy and add 1
                 # these are the lengths to draw
                 # STACK: ["Hello"," ","World"," "], [6, 2, 6, 2]
       s         # swap the list of word to the top of the stack
        Ž9÷S     # push [2, 5, 4, 1]
                 # this is the list of directions to draw
                 # 1=northeast, 2=east, 4=south, 5=southwest
            Λ    # paint on canvas
```
[Answer]
# [Python 2](https://docs.python.org/2/), 82 bytes
```
b=p=0
r=''
for w in input():
 for c in w:r+='\n'.ljust(p)*b+c;p+=1-b
 b^=1
print r
```
[Try it online!](https://tio.run/##JYzdDoIwDEbv9xRLbwBRI15i9iSIyQbjx4xt6UZQXh4pJk1Oe9p@/hsHZ@/bMoxG86LUH91wBIBNCS9uDEWSsM4hX/ho9/JzTLOScVINqaXEXCRPm1zNew4x9dlJ5c3D56K4KMbVSxTM42gjx@0go/AKBm2MgzOHxaFpoWYVSOvioJFk1CESQ9xf@mPr0fUop4nmfePndTU6UCttS2hcq4m9M90/70jY783hJdQ/ "Python 2 – Try It Online")
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), 57 bytes
```
->,[[.<+>,],[<<[-]++++++++++.--[-<++++>]>[-<+<.>>]>.<,],]
```
[Try it online!](https://tio.run/##PcoxDoAgDEDR3gfaEzS9SMOAqISIYDAuXh5h8U9v@EvzqexPOHpHsarERqyzyqzozB8hKvKUOJlikiHi8brer1Zj8@eZSoTred@83eDLCqGuG8Sa9w8 "brainfuck – Try It Online")
Takes input as NUL separated strings. Note that this is using EOF as 0, and will stop working when the ladder exceeds 256 spaces.
### Explanation:
```
-           Initialise counter as -1
>,[         Start ladder
   [.<+>,]  Print the first word, adding the length of it to the counter
   ,[       Loop over each letter of the second word
      <<[-]++++++++++.    Print a newline
      --[-<++++>]         Create a space character
      >[-<+<.>>]          Print counter many spaces
      >.<,                Print the letter and move to the next letter
   ] 
   ,        Repeat until there are no more words
]
```
[Answer]
# JavaScript, 62 bytes
```
a=>' '+a.replace(/./g,c=>1-c?(a=!a,''):a?(p+=' ',c):p+c,p=`
`)
```
[Try it online!](https://tio.run/##lY85DsIwEEV7TjHQ2FYWlhLJcJWMnIkBDR7LNiDl8sF0iI76//eXGz4xu3SNpQsy0jLZBe1JgWqwTxQZHeltv/Wts6d9584a7RpbpcwRzzo2tjpbZ46xcW20w2owi5OQhaln8XrSmwsxC7wk8bgxZvWtqk59OgiLPux@tEpikHKhBIVygVzSNfg/E2ISn/B@ryTExzwzZcAwgqtPwQtP/y6CXKOYACu4vAE "JavaScript (Node.js) – Try It Online")
Thanks [Rick Hitchcock](https://codegolf.stackexchange.com/users/42260/rick-hitchcock), 2 bytes saved.
---
# JavaScript, 65 bytes
```
a=>a.replace(/./g,c=>1-c?(t=!t,''):t?p+c:(p+=p?' ':`
`,c),t=p='')
```
[Try it online!](https://tio.run/##lY@7bsMwDEX3fAWTRTL8SJvRgOJfMSHTSgpGFCS2AfzzjroV3TIfnPv4wh8sPt@T9lEW2le3o7vikCkxerLn4Rw6766fvZ@suqN2xjSjTqn1o02tS5MBM86HufNNpy65incvsQjTwBLsak83YhZ4Subl1DSHv9T05reKUO3l4x@rJkbRG2VQKgpF8z2GNxNSlpDx8agmpO9tYyqAcQFfz0IQXt9dBKVGMQFWcX8B "JavaScript (Node.js) – Try It Online")
```
a=>a.replace(/./g,c=>( // for each character c in string a
    1 - c ?            //   if (c is space)
      (t = !t,         //     update t: boolean value describe word index
                       //       truthy: odd indexed words;
                       //       falsy: even indexed words
        '') :          //     generate nothing for space
    t?                 //   if (is odd index) which means is vertical
      p+c :            //     add '\n', some spaces, and a sigle charater
                       //   else
      (p+=p?' ':'\n',  //     prepare the prepend string for vertical words
         c)            //     add a single character
),
  t=p=''               //   initialize
)
```
[Answer]
# [Aheui (esotope)](https://github.com/aheui/pyaheui), ~~490~~ ~~458~~ 455 bytes
```
삭뱃밸때샏배샐배새뱄밿때빠뱋빼쌘투＠밧우
＠두내백뱃빼선대내백뱃섣＠여우샐처샐추
희차＠＠＠뭏누번사＠빼뭏오추뻐＠＠＠배
Ｂｙ＠＠＠새대백＠＠＠우뻐색
Ｌｅｇｅｎ＠＠빼쵸누번＠＠빼
ＤＵＳＴ＠＠＠샌뽀터본섣숃멓
＠＠＠＠＠＠＠오어아＠먛요아＠＠샏매우
＠＠＠＠＠아＠＠＠＠＠＠오＠＠＠＠＠서어
＠＠＠＠＠희차＠＠요
```
[Try it online!](https://tio.run/##XZBRSsNAEIbfc4pcrdgYC21TKn3pU0lWjBhMxFZjVQgaaIUUNm0qCSZ4oJmyR4izSU1rYRiWf/75ZnZaF9qoU5ZoriC2gKcwc9BygXO0vCrbEDPgP6RDFkB8C1mOjr@zI5EHwBc454p83XtgJsBjSSEHC8CZNAqyD/LgU0Ru4uLal/lrquzeIuRLqtUBKxdsBmsbzQqf5aSgH5IVvr2DjcuZ76J4biS5Jw3k8UGZc@pB64askSiuRHFd5bs9g5bcpvW0RiFrKPKtyDciT47YDhSTHeOwSeknaFvw@aA05eOQuz4mOGOSt3zB@bR@VxQXFuH@XP96/hwnoFOFvRL6tPn4gDStLAdDQx@2er1OX1cHo/G4q12qrX5bPTPamqob3fNf "Aheui (esotope) – Try It Online")
Slightly golfed by using full-width characters(2 bytes) instead Korean(3 bytes).
# Explanation
Aheui is befunge-like esolang. Here is code with color:
[![Aheui code with color](https://i.stack.imgur.com/wIDnW.png)](https://i.stack.imgur.com/wIDnW.png)
?1 part checks if current character is space or not.
?2 parts check whether words had written right-to-left or top-to-down.
?3 part is break condition of loop which types spaces.
?4 parts check if current character is end of line(-1).
Red part is stack initialization. Aheui uses stacks (from `Nothing` to `ㅎ` : 28 stacks) to store value.
Orange part takes input(`뱋`) and check if it is space, by subtracting with `32`(ascii code of space).
Green part add 1 to stack which stores value of length of space, if writing right-to-left.
Purple part is loop for printing spaces, if writing up-to-down.
Grey part check if current character is `-1`, by adding one to current character.
Blue part prints current character, and prepare for next character.
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-P`](https://codegolf.meta.stackexchange.com/a/14339/), 15 bytes
```
ò mrÈ+R+YÕùT±Xl
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVA&code=8iBtcsgrUitZ1flUsVhs&input=WyJwcm9ncmFtbWluZyIsICJwdXp6bGVzIiwgImFuZCIsICJjb2RlIiwgImdvbGYiXQ)
```
ò mrÈ+R+YÕùT±Xl     :Implicit input of string array
ò                   :Partition into 2s
  m                 :Map each pair
   r                :  Reduce by
    È               :  Passing through the following function as X & Y
     +              :    Append to X
      R             :    Newline
       +            :    Append
        YÕ          :    Transpose Y
          ù         :    Left pad each line with spaces to length
           T±       :      T (initially 0) incremented by
             Xl     :      Length of X
                    :Implicitly join and output
```
[Answer]
## bash, 119 chars
```
X=("\e7" "\n\e8")
w="$@"
l=${#w}
d=0
for((i=0;i<l;i++));do
c="${w:$i:1}"
[ -z $c ]&&d=$((1-d))||printf ${X[$d]}$c
done
```
This uses ANSI control sequences to move the cursor - here I'm only using save `\e7` and restore `\e8`; but the restore has to be prefixed with `\n` to scroll the output if it's already at the bottom of the terminal. For some reason it doesn't work if you're not *already* at the bottom of the terminal. \* shrug \*
The current character `$c` is isolated as a single-character substring from the input string `$w`, using the `for` loop index `$i` as the index into the string.
The only real trick I'm using here is `[ -z $c ]` which will return `true`, i.e. the string is blank, when `$c` is a space, because it's unquoted. In correct usage of bash, you would quote the string being tested with `-z` to avoid exactly this situation. This allows us flip the direction flag `$d` between `1` and `0`, which is then used as an index into the ANSI control sequence array, `X` on the next non-space value of `$c`.
I'd be interested to see something that uses `printf "%${x}s" $c`.
Oh gosh let's add some whitespace. I can't see where I am...
```
X=("\e7" "\n\e8")
w="$@"
l=${#w}
d=0
for ((i=0;i<l;i++)); do
  c="${w:$i:1}"
  [ -z $c ] && d=$((1-d)) || printf ${X[$d]}$c
done
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 65 bytes
```
{$/=0;.map:{$/+=$++%2??!.comb.fmt("%$/s","
").print!!.say*.comb}}
```
[Try it online!](https://tio.run/##HYxNCoMwGAX3OcVnUNGmxNJFFxXxIt2kJlEhfyQpRcWzp6G7eczwnPDqkfQGtYQhHWU33HqqmXtmJENJSHUfx4JOVr@p1LHBVdkFfMUIt9T51cSioIFtl39xnklaD41ajQgtHAiA0K/1PNBa9nnlEvDLYHSmRShlIUvFETM2LsJDFCFCiPl2Rs7b2TOtM4P77LsSAZjhMFkuYLZKIgYhSyWA/QA "Perl 6 – Try It Online")
Anonymous code block that takes a list of words and prints straight to STDOUT.
### Explanation
```
{                           }  # Anonymous code block
 $/=0;                         # Initialise $/ to 0
 .map:{                    }   # Map the list of words to
       $/+=                    # Increment $/ by
           $++%2??             # For even indexes
                   .comb       # Each letter of the word
                   .fmt(           ) # Formatted as
                        "%$/s"       # Padded with $/-1 spaces
                              ,"\n"  # Joined by newlines
                   .print            # And printed without a newline
                  !   # Boolean not this to add 0 to $/
                !!            # For odd indexes
                  .say        # Print with a newline
                      *.comb  # And add the length of the word
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal/wiki), 19 [bytes](https://github.com/somebody1234/Charcoal/wiki/Code-page)
```
ＦＬθ¿﹪ι²«↓§θι↗»«§θι↙
```
Input as a list of strings
[Try it online (verbose)](https://tio.run/##dYyxCsIwEIZ3nyJkSiAujnUSVCi0IIJT6RCaNA2kuTRNq1R89hiLg4vDf3d8x/c3HfcNcBPjGTwppFWhIwOlG4TylpQgJgNEsx2lz4QQunhtA8mOcLcMHUJuhXyQgWlK9@u/hFmS7OauWnVhZa@Ukxnlr/9X/PQWsv2aMVYVdh6U532vrcIMu2lZjBzTxa1IswEh01JgWlzXcTubNw) or [try it online (pure)](https://tio.run/##S85ILErOT8z5///9nmXv96w5t@PQ/vc7V53beWjTodWP2iYfWn5ux7mdj9qmH9p9aDWMM/P//@hopYKi/PSixNzczLx0JR2lgtKqqpzUYiArMS8FSCbnp6QCqfT8nDSl2FgA)
**Explanation:**
Loop in the range `[0, input-length)`:
```
For(Length(q))
ＦＬθ
```
If the index is odd:
```
If(Modulo(i,2)){...}
﹪ι²«...»
```
Print the string at index `i` in a downward direction:
```
Print(:Down, AtIndex(q,i));
↓§θι
```
And then move the cursor once towards the top-right:
```
Move(:UpRight);
↗
```
Else (the index is even):
```
Else{...}
«...
```
Print the string at index `i` in a regular right direction:
```
Print(AtIndex(q,i));
§θι
```
And then move the cursor once towards the bottom-left:
```
Move(:DownLeft);
↙
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~89~~ 88 bytes
```
s=i=-1
r=''
for w in input():r+=[('\n'+' '*s).join(' '+w),w][i];s-=i*len(w);i=~i
print r
```
[Try it online!](https://tio.run/##JU27DsIwDNzzFZGX9AFIICZQJmDmA0qHioY2KMSRExRg4NdLUiRLd76z79w7jGg30@F8PEkCgMlLLZdrRlIIdkPikWubxj1DUe6olk0hLlbUgovKl6s7alskXsdyEdtGt3u/lLoyyhax3Gv51cyRtoHTNCNLFYypl7ryXFltpwZGZQzCgkNEMj20rIHOYhgVZTEoHzL6kP6H2XWEA3WPR96T456fj1E@0872Ga7Yq4wDmts/b05I92bWO2h/ "Python 2 – Try It Online")
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 122 bytes
```
a=>{int i=0;var t="\n";foreach(var z in a)Write(i++%2<1?z+(t+="".PadRight(z.Length-(i<2?1:0))):string.Join(t,z.Skip(0)));}
```
[Try it online!](https://tio.run/##jY8xT8MwEIX3/oqTJSRHaaO2Y5O0YkUdEB0YgOFwLskJ147sAyQjfntI6YKYMr739N17Z@LKRB5vjbB3VZTArnt62bf1iPX@i50A1@vyAwNIrZ6dKlsfCE2vL1YCdoDZY2AhzXl@s602h5RryWulintsHrjrRafiSK6TfqW52h42u3WWZbtrVXHn2WlZpuL0xoO@JOX3WC5arRBewUADBK0qToNl0VO4@C07siP9X0xMT9Z6@PTBNrMZdF56mv6jKHBdNZsdgu8Cns8TA8N7SpYioGvA@Iag83b@coQ4HbEE@AcZfwA "C# (Visual C# Interactive Compiler) – Try It Online")
[Answer]
# [J](http://jsoftware.com/), ~~47~~ ~~45~~ 43 bytes
```
;[`(([:<@(+/)\#&>##$#:@1 2)@])`([' '"0/[)}]
```
[Try it online!](https://tio.run/##NclBC4IwAIbhu7/iw0XbqGZ2nBqDoFOnrkty6LRCnahdhH67CdHhvTzva/YFLZFIUGyxh1zaCZyul/Mc6YwxLWPFNgG/kfWRkBWRKsSBq5RnTFNQfx9o/kln7o12GJEIaAmbP5wqEUfiHnq/QWEwPNuqtjD0T13vqt40zeLo3tNU2wGmLZC7wqJydUm9@Qs "J – Try It Online")
I found a fun, different approach...
I started messing around with left pads and zips with cyclic gerunds and so on, but then I realized it would be easier to just calculate each letter's position (this boils down to a scan sum of the correctly chosen array) and apply amend `}` to a blank canvas on the razed input.
The solution is handled almost entirely by Amend `}`:
```
; [`(([: <@(+/)\ #&> # # $ #:@1 2)@])`([ ' '"0/ [)} ]
```
* `; ( single verb that does all the work ) ]` overall fork
* `;` left part razes the input, ie, puts all the letters into a contiguous string
* `]` right part is the input itself
* `(stuff)}` we use the gerund form of amend `}`, which consists of three parts `v0`v1`v2`.
	+ `v0` gives us the "new values", which is the raze (ie, all the characters of the input as one string), so we use `[`.
	+ `v2` gives us the starting value, which we are transforming. we simply want a blank canvas of spaces of the needed dimensions. `([ ' '"0/ [)` gives us one of size `(all chars)x(all chars)`.
	+ The middle verb `v1` selects which positions we will put our replacement characters in. This is the crux of the logic...
* Starting at position `0 0` in the upper left, we notice that each new character is either 1 to the right of the previous position (ie, `prev + 0 1`) or one down (ie, `prev + 1 0`). Indeed we do the former "len of word 1" times, then the latter "len of word 2" times, and so on, alternating. So we'll just create the correct sequence of these movements, then scan sum them, and we'll have our positions, which we then box because that's how Amend works. What follows is just the mechanics of this idea...
* `([: <@(+/)\ #&> # # $ 1 - e.@0 1)`
	+ First `#:@1 2` creates the constant matrix `0 1;1 0`.
	+ `# $` then extends it so it has as many rows as the input. eg, if the input contains 3 words it will produce `0 1;1 0;0 1`.
	+ `#&> #` the left part of that is an array of the lengths of the input words and `#` is copy, so it copies `0 1` "len of word 1" times, then `1 0` "len of word 2 times", etc.
	+ `[: <@(+/)\` does the scan sum and box.
[Answer]
# T-SQL, 185 bytes
```
DECLARE @ varchar(max)='Thomas Clausen Codegolf Script'
,@b bit=0,@s INT=0SET @+=':'WHILE @ like'%_:%'SELECT
@b+=len(left(@,1))-1,@=stuff(@,1,1,'')+iif(left(@,@b)='','','
'+space(@s))+trim(left(@,1)),@s+=len(left(@,~@b))PRINT
stuff(@,1,1,'')
```
**[Try it online](https://data.stackexchange.com/stackoverflow/query/1055394/construct-a-word-ladder)**
[Answer]
# [Retina](https://github.com/m-ender/retina/wiki/The-Language), 51 bytes
```
1,2,`\w+
;$&
+(m`^(.(.*?)) ?;(.)
$1¶$.2* $3;
; |;$
```
[Try it online!](https://tio.run/##FcxLCsIwEIDh/ZxiFlHSB4HWZRZdegmRBpM@YJqUSUqheC4P4MVi3f3wwc8uzd40@SLvfW7qtu4fewVaXKGSS/@USqqyKwrstFQFiOb7EaotUdw0aHxrATlPjijgHpgsGB/S5BiTiwlj4tmPsHIY2SzL2bhux0EuovEWX8E6HAMNYDCeSA4NDGHj/8tGnD0aoh8 "Retina – Try It Online")
A rather straightforward approach that marks every other word and then applies the transformation directly.
### Explanation
```
1,2,`\w+
;$&
```
We mark every other word with a semicolon by matching each word, but only applying the replacement to the matches (which are zero indexed) starting from match 1 and then 3 and so on.
```
+(m`^(.(.*?)) ?;(.)
$1¶$.2* $3;
```
`+(m` sets some properties for the following stages. The plus begins a "while this group of stages changes something" loop, and the open bracket denotes that the plus should apply to all of the following stages until there is a close bracket in front of a backtick (which is all of the stages in this case). The `m` just tells the regex to treat `^` as also matching from the beginning of lines instead of just the beginning of the string.
The actual regex is pretty straightforward. We simply match the appropriate amount of stuff before the first semicolon and then use Retina's `*` replacement syntax to put in the correct number of spaces.
```
; |;$
```
This stage is applied after the last one to remove semicolons and spaces at the end of words that we changed to vertical.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 58 bytes
```
(?<!^(\S* \S* )*\S*)
¶
¶? 
+`(..(.)*¶)((?<-2> )*\S)
$1 $3
```
[Try it online!](https://tio.run/##HYxRCsIwEET/9xQrVEgqFtRfsZ8ewF@RBpPWwjZbNilCD9YD9GIxFWaGgXmMuNh7k/bq3iRVX3cv9XyUuFmXOTWsS1aNAIdGVZWqdLkuWmX0eL79GQ3FCYtLSh9HxPhlIQvGc/w4wehCxBCl9x2Mwp2YYcgdx2meyQU03uKbrcOOqQWDIY/k0EDLk2xfNmDv0RD9AA "Retina 0.8.2 – Try It Online") Link includes test cases. Alternative solution, also 58 bytes:
```
( \S*) 
$1¶
+` (.)
¶$1 
 ¶
+`(..(.)*¶)((?<-2> )*\S)
$1 $3
```
[Try it online!](https://tio.run/##FcxNCoMwFATg/TvFLCwklgq221KXPYBbF4Ym/sAzkSRS8GAewIul6W74hhlv4mxVuoh3nwS6tpSgoj4PuvYQlaTzKGoQMmQRVZWtPA8pRPO83V@QZdfKPEDxSGkyzA5f51mTsi5OxiOaEBGin@1Iq3ejV8uSM9Zt39kEKKvxcdpgdDyQQsglGyga3Ob/XzpgtlDMPw "Retina 0.8.2 – Try It Online") Link includes test cases.
I'm deliberately not using Retina 1 here, so I don't get operations on alternate words for free; instead I have two approaches. The first approach splits on all letters in alternate words by counting preceding spaces, while the second approach replaces alternate spaces with newlines and then uses the remaining spaces to help it split alternate words into letters. Each approach has to then join the last vertical letter with the next horizontal word, although the code is different because they split the words in different ways. The final stage of both approaches then pads each line until its first non-space character is aligned under the last character of the previous line.
Note that I don't assume that words are just letters because I don't have to.
[Answer]
## J, ~~35~~ 33 bytes
```
3 :'[;.0>(,|:)&:,.&.>/_98{.;:|.y'
```
This is a verb that takes the input as a single string with the words separated by spaces. For example, you could call it like this:
```
3 :'[;.0>(,|:)&:,.&.>/_98{.;:|.y' 'programming puzzles and code golf'
```
The output is a matrix of letters and spaces, which the interpreter outputs with newlines as required. Each line will be padded with spaces so they have the exact same length. 
There's one slight problem with the code: it won't work if the input has more than 98 words. If you want to allow a longer input, replace the `_98` in the code by `_998` to allow up to 998 words, etc.
---
Let me explain how this works through some examples. 
Suppose we have a matrix of letters and spaces that we imagine is a partial output for some words, starting with a horizontal word.
```
   [m=: 3 3$'vwx  y  z'
vwx
  y
  z
```
How could we prepend a new word before this, vertically? It's not hard: just turn the new word to a single-column matrix of letters with the verb `,.`, then append the output to that single-column matrix. (The verb `,.` is convenient because it behaves as an identity function if you apply it to a matrix, which we use for golfing.)
```
   (,.'cat') , m
c  
a  
t  
vwx
  y
  z
```
Now we can't just iterate this way of prepending a word as is, because then we'd only get vertical words. But if we transpose the output matrix between each step, then every other word will be horizontal. 
```
   (,.'dog') , |: (,.'cat') , m
d     
o     
g     
catv  
   w  
   xyz
```
So our first attempt for a solution is to put each word into a single-column matrix, then fold these by appending and transposing between them.
```
   > (,|:)&.>/ ,.&.>;: 'car house dog children'
c            
a            
r            
housed       
     o       
     g       
     children
```
But there's a big problem with this. This puts the first letter of the next word before turning a right angle, but the specification requires turning before putting the first letter, so the output should be something like this instead:
```
c             
a             
rhouse        
     d        
     o        
     gchildren
```
The way we achieve this is to reverse the entire input string, as in
```
nerdlihc god esuoh rac
```
then use the above procedure to build the zig-zag but turning only after the first letter of each word:
```
n     
e     
r     
d     
l     
i     
h     
c     
gode  
   s  
   u  
   o  
   h  
   rac
```
Then flip the output:
```
   [;.0> (,|:)&.>/ ,.&.>;:|. 'car house dog children'
car   
  h   
  o   
  u   
  s   
  edog
     c
     h
     i
     l
     d
     r
     e
     n
```
But now we have yet another problem. If the input has an odd number of words, then the output will have the first word vertical, whereas the specification says that the first word must be horizontal. To fix this, my solution pads the list of words to exactly 98 words, appending empty words, since that doesn't change the output. 
[Answer]
# [PowerShell](https://docs.microsoft.com/en-us/powershell/), ~~101 89~~ 83 bytes
-12 bytes thanks to [mazzy](https://codegolf.stackexchange.com/users/80745/mazzy).
```
$args|%{$l+=if(++$i%2){$_.length-1;$t+=$_}else{1;$_|% t*y|%{$t+='
'+' '*$l+$_}}};$t
```
[Try it online!](https://tio.run/##dVLRboMwDHz3V1hVmKHQSdvjpkr8CWMlpUgpYUmqdqV8O3MIneik5cG@i@@cxEqnz9LYg1RqFJ@4xX4UpantLeqFSrfNPk5T0USvSS@KZyXb2h02L@/CpVtRDFJZ2TMrbhG69bf3cIGAUkJas581w8DqcQCIiTLMOSZJhjHttQ7cA96COCfw19CAvM5TDNhMUU2xAsozpEnIfjproyqa7WWr3UEGOaKbs5yzve9bZ5q29o1odvhOTlrnc6jeW3ZG16Y8Hr0Bf1e3wKcFvv6D1QLLBbZlWy0or90j1Y/0j1jWWu3DQBb39I/oTterktZDPsKnna6kz95CcB8YWGighRoUyDJ0KqchcB816UtK8IYR9tPR4pKh6PibiCJww/gJ@efkYSYrEYsLbuQXl5K3j1b0ZljBMP4A)
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), ~~74~~ 65 bytes
```
-join($args|%{$_|% t*y|%{($p+=(' ','
')[!$p]*!$i)*$i;$_};$i=!$i})
```
[Try it online!](https://tio.run/##dVLbTsMwDH3PVxiWkXaM/QCatDfENyA0wmq6oCwpccpgl28fTtqhDgk/2MeufU7qpPFbDLRGa0/yFeawP929e@MKqUNNh/FeLg9jiJNvhoVsbueFAjVVQpVPV7J5nlxJU06kuZfL4700c06P5ekoRLFQIpF6AWzb7DscsrfZV0ItpqByo2Kw9cFWqpzmce18XGPXDhD7iH2kc51iMK5ORKqfSEwRKabYfT1TNsHXQW82aQB@rRngdoB3/2A7wDjApF01SNlWl6m/TP80Y@3tW7eQwTnTTzTtbmeREmSJFFa@whTTiBLnhQkSRjhRCytQd0w6L4F5bO7XqoQDjGGfpSV@NbiKWE1BEt@9XHblgNTayIUbfhILAhgBNVbHyDwzeIzQEgJvGkJrEdSD@UQHGqyhCP4NdASLmnHceuArrWg2m6lLxTv8KHqd/N6uX9x1mVtGZ/lfG0HrVn6zQceUa0Ms5FjfQ2XSsb6hH@jumsTx9AM "PowerShell – Try It Online")
[Answer]
# [R](https://www.r-project.org/), 126 bytes
```
function(x,`>`=strrep)for(i in seq(x)){H=i%%2;cat(paste0('
'>!H,' '>F*!H,e<-'if'(H,x,strsplit(x,''))[[i]]))
F=F+nchar(e[1])-H}
```
[Try it online!](https://tio.run/##pc5BasMwEAXQvU/hGMKMWhmSbFN7aXwHxxChjByBI6mSAialZ3cl36BkNn828/74VTWrehoZtTW48Gt7bUL0nhxT1qMutSkDfePC2E/f6P3@dJYiohMh0gGhgHbXcyih7T7SQl81aAXY84UnJbhZx4QCMDYMehwZK7qm@zTyLjzScBxZ3f@uCiVWwth4J1/xsooUYs4kaDNV6ShXwsXU/5mLAVZstPN28uLxyFhi3fP1minkVZhbDmlvlHOys3q/Tmy/p7J5Q8U74voH "R – Try It Online")
* -3 bytes thanks to @Giuseppe
[Answer]
## T-SQL, 289 bytes
```
DECLARE @ VARCHAR(MAX)='a a',@I INT=1,@S INT=0,@B INT=0WHILE @I<=LEN(@)IF SUBSTRING(@,@I,1)=''IF @B=0SELECT @S-=1,@=STUFF(@,@I,1,'
'+SPACE(@S)),@I+=@S+3,@B=1 ELSE SELECT @=STUFF(@,@I,1,''),@S+=1,@B=\ELSE IF @B=0SELECT @I+=1,@S+=1 ELSE SELECT @=STUFF(@,@I,0,'
'+SPACE(@S)),@I+=@S+3PRINT @
```
This runs on SQL Server 2016 and other versions.
@ holds the space-delimited list. @I tracks the index position in the string. @S tracks the total number of spaces to indent from the left. @B tracks which axis the string is aligned with at point @I.
The byte count includes the minimal example list. The script goes through the list, character by character, and changes the string so that it will display according to the requirements. When the end of the string is reached, the string is PRINTed.
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 75 bytes
```
a=>a.map(x=>i++&1?[,...x].join(`
`.padEnd(n)):(n+=x.length,x),n=i=0).join``
```
[Try it online!](https://tio.run/##jdBBTsMwEIXhfU8xygLZSmrBFuSy4hQFyUPsOK4mM5ZtIOrlQ8QSFmX//dLTu@An1rGk3I4sPmyT3dCe0CyY1WpPqe/vHp7PgzFmfTMXSazcwZmM/oW9Yq0fFfd2NRQ4tnlY9cA22Xv9Q53bnkbhKhQMSVST6hDeYQQPAabO1EypOXB66F6504ffeA5EAl9SyN/GyNLmUKCF2qC2kjjejnKRWHBZdgz543qlUAHZw7hfAVHoHyMR6l5TAPxjt28 "JavaScript (Node.js) – Try It Online")
### Explanation and ungolfed
```
function f(a) {                   // Main function:
 return a.map(                    //  Map through all words:
  function(x) {
   if (i++ & 1)                   //   If i % 2 == 1 (i.e. vertical):
    return [,...x].join(          //    Since the first one needs to have its own linefeed 
                                  //    and indentation, add a dummy item to the start.
     "\n".padEnd(n)               //    Join the array with the padded line feeds.
    );
   else {                         //   If i % 2 == 0 (i.e. horizontal):
    n += x.length;                //    Add the length of this string to the variable that
                                  //    counts how long the padded line feeds should be.
    return x;                     //    Append the string at the end without line feeds.
   }
  },
  n = i = 0                       //   Initialize variables.
                                  //   n: the length of the padded line feeds 
                                  //      (including the line feed)
                                  //   i: keeps track of the direction
 ).join("")                       //  Join all stuffs and return.
}
```
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 12 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
ìZΣFτëWº═φ‼R
```
[Run and debug it](https://staxlang.xyz/#p=8d5ae446e78957a7cded1352&i=programming%0Apuzzles%0Aand%0Acode%0Agolf%0A%0Aa%0Asingle%0Aa&a=1&m=1)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 21 bytes
```
Ẉm2Ä’x2Ż⁶xⱮṛ;⁷ɗ;ⱮY¥ƭ"
```
[Try it online!](https://tio.run/##y0rNyan8///hro5co8MtjxpmVhgd3f2ocVvFo43rHu6cbf2ocfvJ6dZATuShpcfWKv3//1@poCg/vSgxNzczL11JR6mgtKoqJ7UYyErMSwGSyfkpqUAqPT8nTQkA "Jelly – Try It Online")
A full program taking the input as a list of strings and implicitly outputting to stdout the word ladder.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 93 87 bytes
Thanks to gastropner for the suggestions.
This version takes an array of strings terminated by a NULL pointer.
```
c,d;f(s,t)char**s,*t;{for(c=d=0;t=*s++;d=!d)for(;*t;c+=!d)printf("\n%*c"+!d,d*c,*t++);}
```
[Try it online!](https://tio.run/##XVHJTsMwEL3nK1wjpHgpAvXAwYQvqLhxAg7W2E4iOXZku1Rq1V8n2AlL4OJZ3rw3Mx7YtgDTBFwJU0eeCHQyUBo5TeJsfKihUc2tSA2NjAnVbBQpWZFhYCUaQ@@SqfGru6aA2UZxRSGzGSPiMl31DuxBafQQk1La3HSPVZUJaJC9q4sjQwscla6I0hy8E3Su0FciphBf3lAzpxDCnbbWY47w0QersvP0vN/zBZPOp06HgiYdU7GZ3rv2b9kYfBvkMCwAHg@nk9WxuNIVRQxe6WJbb82/DrNmJtq5QK7Qi/iZOS8RVjOjsgP/ddluHdyvg7tvqKguovmdj7Ao09hkcZH/RaDxkGKNMSHI1OU2RFSX6QOMlW2ctsdP "C (gcc) – Try It Online")
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 152 bytes
```
<>([()])<>{<>({}<>{()<({}<>)><>}<>)<>{}{<>({}<((()()()()()){})>)({<({}[()]<((((()()()()){}){}){})>)>()}{})<>(({}<>({}))[({}[{}])])<>}{}}<>{}{({}<>)<>}<>
```
[Try it online!](https://tio.run/##TU1bDsMgDOM48UdvgLhI1Q/WB6pGoWLaT1HOngW6SVOi2IoT@1H8noYt@qeIdTQSJlhXlVZWJNhO4KxroCv@ikSEX6EyHKi242bRRPoX71YbAitRh26rAxjbU@WpJ6vKPeSO7akiZ8mh@OPYUzDn@7ri@jI@LWbOy2pCjpsM8wc "Brain-Flak – Try It Online")
I suspect this can be shorter by combining the two loops for odd and even words.
]