g | x | w | all
Bytes Lang Time Link
056AWK250228T210912Zxrs
167sed 4.2.2 rz240708T120658Zguest430
061Arturo240708T150511Zchunes
079Julia240628T100136ZGlory2Uk
071Ruby240628T092739ZGlory2Uk
140Go240629T144017Zbigyihsu
009Uiua SBCS240629T034250Zchunes
242Elisp240628T145230ZSamuel J
013K ngn/k220823T235407ZBubbler
059Python 3220823T225334ZDLosc
068Python220823T221447Z97.100.9
103Knight220823T214919ZnaffetS
010BQN220823T182319ZDLosc
086C# Visual C# Interactive Compiler220823T053414ZIvan Nee
003Pip220822T193744ZDLosc
001Vyxal s220822T185159ZnaffetS
nan220129T165832ZGabe
022Factor220129T162456Zchunes
nan170906T141910ZDom Hast
049Jq 1.5170922T152047Zjq170727
073R170922T143518Zuser2390
029K oK170906T143701Zmkst
096Python 2161209T164326ZAncientS
020TXR Lisp170802T150745ZKaz
053Perl 5170802T032236ZXcali
075Python 3170801T173213Zbiowease
058Python 2170416T064731ZKeerthan
195Oracle SQL170416T010800ZDemonbla
003Pyth161208T132440ZMaltysen
160Java161208T230310Zuser1893
067PHP161208T141441ZTitus
063PHP161209T105818Zaross
033Haskell161208T150728ZLaikoni
071C161208T173703ZJacajack
055Bash + GNU utilities161208T181939ZDigital
032Perl 6161208T160955Zsmls
046JavaScript ES6161208T155721ZNeil
006Actually161208T124731ZSherlock
046JavaScript ES6161208T131948ZETHprodu
084C161208T141702ZKarl Nap
013J161208T141812Zmiles
069Python 2161208T132129ZKade
077PHP161208T132831ZXanderha
001Jelly161208T132152Zlynn
013Retina161208T121444ZMartin E
004CJam161208T121216ZMartin E

AWK, 56 bytes

{for(i=0;i++<NF;)b[i]=b[i]$i}END{for(m in b)printf b[m]}

Attempt This Online!

{                  # for each record
for(i=0;i++<NF;)   # traverse each char
b[i]               # array of strings
=b[i]$i}           # append char at it's appropriate position
END{               # when out of records
for(m in b)        # for elements of array
printf b[m]}       # print each string

sed 4.2.2 -rz, 208 187 167 bytes

s/^|\n/\n"/g                               # prefix strings with "
:o                                         # reset loop:
s/\n\."/\n"/                               #     remove marker
s/\n"/\n."/                                #     mark first string
:h                                         # main loop:
s/([^\n]*)(.*\n\.")([^\n])(.*)/\1\3\2\4/   #     move char from marked string to output
t;:                                        #     try:
s/(.*)\n\."([^\n]*)\n"(.*)/\1\n"\2\n."\3/  #         move marker down 1 string
/^[^\n]*(\n\.?")*$/!{To;Th}                #     if (chars still present): {catch: {jump to reset loop}; jump to main loop}
s/\n.*//                                   # clean up output

Try it online!

takes input as newline-separated strings (ie you can't have newlines in your strings). this version fixes bugs related to having strings which match my string-separator markers too closely, and vastly improves the control flow.

I know that's not how try-catch statements work, but that's how sed's logic flow works. let me know if there's a better way to pseudocode it.

Arturo, 61 bytes

$->a[r:""a|map=>size|max|loop'i->loop a's->try->'r++s\[i-1]r]

Try it!

Julia, 96, 79 bytes

-,~=length,join
!a=-a<2 ? ~a : ~[(m=map(*,a...););!SubString.(a,-m+1)[.-a.>-m]]

Try it online!

I have noticed that the concatenation with map(*,a...) was a good starting point: it kind of interleaves all strings of a list with certain exceptions: the list a cannot have 1 or 0 elements and the number of the interleaved characters are limited by the size of the shortest string.

Here, the interleaved piece is recursively joined with the next part of the output where already participated characters as well as the empty string get removed.

The party ends as soon as the list a has reached the length less than 2.

Not a translation, but similar to my Ruby answer.

Ruby, 86 83 71 bytes

f=->s{s[0]&&(s.reject! &:empty?;[s.map{_1[0]},f[s.map{_1[1..]}]].join)}

Attempt This Online!

A rather naive approach and my first ruby golf; later I could improve using some tips from my other Ruby golf.

Go, 140 bytes

func(s[]string)(o string){for L,e,i,k:=len(s),0,0,0;e!=L;i++{
r:=s[i%L]
if len(r)<=k{e++;continue}
o+=r[k:k+1]
if i%L==L-1{k++;e=0}}
return}

Attempt This Online!

Explanation

func(s[]string)(o string){
for L,e,i,k:=len(s),0,0,0;e!=L;i++{ // loop while the the whole slice is not "empty"
j:=i%L // get the index of the string to look at
r:=s[j] // the string to try to take from
if len(r)<=k{e++;continue} // if the current k-index is farther along than the string's length, skip it
o+=r[k:k+1] // add the first character of the string to the output
if j==L-1{k++;e=0}} // move to the next character and reset the "empty" counter if at the end of the slice
return}

Uiua SBCS, 9 bytes

⊏⍏∩/◇⊂⍚°⊏

Try it!

Explanation

⊏⍏∩/◇⊂⍚°⊏­⁡​‎‎⁡⁠⁢⁣‏⁠‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣‏⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁢‏‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁡‏‏​⁡⁠⁡‌­
      ⍚°⊏  # ‎⁡get list of length-ranges of input
  ∩/◇⊂     # ‎⁢flatten both ranges and input
 ⍏         # ‎⁣get rise (grade up) of flattened ranges
⊏          # ‎⁤index into input

Port of miles' J solution.

Elisp, 242 Bytes

This is literally my first time so it could probably be smaller and it only works with two arguments (assigned to a and b)

(setq a (elt argv 0))(setq b (elt argv 1))(with-temp-buffer (insert a b)(setq i 0)(ignore-errors (while (< i (length b))(progn (goto-char (+(length a) 2 i))(transpose-chars (* -1 (- (length a) i 1)))(setq i (+ i 1)))))(princ (buffer-string)))

Ungolfed version

(setq a (elt argv 0))
(setq b (elt argv 1))
(with-temp-buffer
  (insert a b)
  (setq i 0)
  (ignore-errors
(while (< i (length b))
  (progn
    (goto-char (+(length a) 2 i))
    (transpose-chars (* -1 (- (length a) i 1)))
    (setq i (+ i 1))
    )
  )
)
  (princ (buffer-string))
  )

But if you strip away all the boilerplate code its actually much shorter (134).

(insert a b)
(setq i 0)
(while (< i (length b))
  (goto-char (+(length a) 2 i))
  (transpose-chars (* -1 (- (length a) i 1)))
  (setq i (+ i 1))
  )

Elisp really sucks. Someone needs to modify it for golfing if haven't already.

K (ngn/k), 13 bytes

<!/,/'(!#:)'\

Try it online!

Port of miles's J and DLosc's BQN. For a language with flatten and grade/sort-by but not zip-longest, I guess this is one of the best possible approaches.

More straightforward port would be {(,/x)@<,/!'#'x} because K doesn't have fork or over. But it is possible to use K train by abusing repeat-scan:

<!/,/'(!#:)'\
      (   )'\   Given a list of strings, apply this to each list
                until convergence and collect all intermediate values
                (including the input):
       !#:        get the indices of the list
                This always converges after step 1, giving (x;!#x)
   ,/'          Flatten each
<!/             Sort first by second

Python 3, 59 bytes

f=lambda s:s and s[0][:1]+f(s[1:]+[s[0][1:]][:s[0]>""])or""

A recursive function that takes a list of strings and returns a string. Try it online!

Explanation

We're going to build the interleaved string one character at a time. There are several cases to consider:

The implementation goes as follows:

f = lambda s: s and ... or ""

Define f to be a function of one argument, s, which is a list of strings. If s is nonempty, do the ... part (see below); otherwise, return "".

s[0][:1] + f(...)

Since we now know s is nonempty, we can refer to its first element, s[0]. We don't know yet whether s[0] is empty, though. If it isn't, we want to concatenate its first character to a recursive call; if it is, we can concatenate the empty string to a recursive call. Slicing everything left of index 1 works in both cases.

s[1:] + ...

The argument to the recursive call is going to be all but the first element of s, concatenated to either a 1-element list (the rest of s[0] if it was nonempty) or an empty list (if s[0] was empty).

[s[0][1:]][:s[0] > ""]

We put s[0][1:] (the part of s[0] after the first character, which is the empty string if s[0] is empty) into a singleton list and then take a slice of that list. If s[0] is empty, s[0] > "" is False, which is treated as 0 in a slice; thus, we slice from index 0 to index 0--an empty slice. If s[0] is not empty, s[0] > "" is True, which is treated as 1; thus, we slice from index 0 to index 1--the whole 1-element list.


If lists of single-character strings can be used in place of strings, this solution can be 54 bytes:

f=lambda s:s and s[0][:1]+f(s[1:]+(s[0]and[s[0][1:]]))

Try it online!

Python, 68 bytes

lambda S:filter(None,chain(*zip_longest(*S)))
from itertools import*

Attempt This Online!

Knight, 103 bytes

;=m=iF;W=xP;=mI>mLx mLxE++"=x"=i+1i" x"W+=m-mT1;=j~1W>i=j+1j;O+G E+"x"+1jF1'\'E++++"=x"+1j"Sx"+1j"F1''"

Try it online!

BQN, 23 10 bytes

Massive savings by porting miles's J solution

↕∘≠¨⍋⊸⊏○∾⊢

Anonymous tacit function that takes a list of strings and returns a string. Try it at BQN online!

Explanation

↕∘≠¨⍋⊸⊏○∾⊢
   ¨         For each string in the argument list:
  ≠            Take its length
↕∘             and make a range from 0 to that number (exclusive)
             With that list of lists of indices as the left argument
          ⊢  and the original list of lists of strings as the right argument:
        ○∾     Flatten both lists
      ⊸⊏       Index into the flattened string using
    ⍋          the grade-up of the flattened list of indices

Grade up, for those unfamiliar with APL-related languages, is an operation that takes a list and returns a permutation of its indices, such that if the items in the list were reordered according to the order of the indices, the list would become sorted ascending. For example:

Indices:  0 1 2 3 4 5
List:     3 1 4 1 5 9

Grade up: 1 3 0 2 4 5
Sorted:   1 1 3 4 5 9

This operation is useful for sorting one list according to the values of another list, as seen in the above solution.

C# (Visual C# Interactive Compiler), 86 bytes

a=>a.SelectMany(b=>b.Select((c,i)=>(i,c))).OrderBy(b=>b.i).Aggregate("",(s,x)=>s+x.c);

Try it online!

Pip, 3 bytes

WVg

Try it online!

The WV (weave) builtin does exactly this. It's commonly used as a binary operator to weave two iterables together, but it can also be used as a unary operator to weave a list of iterables together. Here, g is the list of command-line arguments.

Vyxal s, 1 byte

Try it Online!

Python3 -66

Python3 version of this one:

lambda*m:''.join(map(lambda*r:''.join([_f for _f in r if _f]),*m))

A super golfed version:

exec(bytes('慬扭慤洪✺⸧潪湩洨灡氨浡摢⩡㩲✧樮楯⡮彛⁦潦⁲晟椠⁲晩张嵦Ⱙ洪⤩','u16')[2:])

Factor, 22 bytes

[ round-robin ""like ]

Try it online!

Perl 5, + -0n 24 bytes

1while s/^./!print$&/gem

Try it online!

Explanation

-0n slurps the input into $_ and repeatedly replaces the first char of each line with the result of negating the print of each match (which is the empty string since print returns 1 by default)

Jq 1.5, 49 bytes

map(explode)|transpose|map(map(values)[])|implode

Explanation

                      # example input:          ["LYES","APRONS"]
  map(explode)        # make list of ordinals   [[76,89,69,83],[65,80,82,79,78,83]]
| transpose           # zip lists               [[76,65],[89,80],[69,82],[83,79],[null,78],[null,83]]
| map(map(values)[])  # rm nulls and flatten    [76,65,89,80,69,82,83,79,78,83]
| implode             # convert back to string  "LAYPERSONS"

Sample Run

$ paste input <(jq -Mrc 'map(explode)|transpose|map(map(values)[])|implode' input)
["SIMPLE"]                  SIMPLE
["POLLS","EPEES"]           PEOPLELESS
["LYES","APRONS"]           LAYPERSONS
["ABCDE", "a c", "123 567"] Aa1B 2Cc3D E567
["\"\\n$?*", "", ",(.)\" "] ",\(n.$)?"* 

$ echo -n 'map(explode)|transpose|map(map(values)[])|implode' | wc -c
  49    

Try it online

R, 73 bytes

for(i in 1:max(nchar(s<-scan(,""))))for(j in seq(s))cat(substr(s[j],i,i))

Try it online!

Explanation: very simple (but verbose), just loop through printing ith character of the jth string. Fortunately, substr returns an empty string if given an out-of-range input.

K (oK), 35 29 bytes

Solution:

{`c$r@&~^r:,/+(`i$x)[;!#,/x]}

Try it online!

Example:

> {`c$r@&~^r:,/+(`i$x)[;!#,/x]}("ABCDE";"a c";"123 567")
"Aa1B 2Cc3D E567"
> {`c$r@&~^r:,/+(`i$x)[;!#,/x]}("\n$?*";"";",(.)\" ")
"\n,$(?.*)\" "
> {`c$r@&~^r:,/+(`i$x)[;!#,/x]}("POLLS";"EPEES")
"PEOPLELESS"

Explanation:

Use 2nd-level indexing to pull out indices from 0 to max (length of flattened list) across all input lists. Any indexing beyond the bound of the sub-list will return a null. Flip (rotates 90), flatten, and then pull out the non-null results.

Notes:

Python 2, 128 96

I was hoping not to have to use itertools

a=lambda a:"".join([i for i in reduce(lambda: b,c:b+c, map(None,*map(lambda m:list(m),a)) if i])

Ungolfed

 a=lambda a:                              #Start a lambda taking in a
    "".join(                              #Join the result together with empty string
        [i for i in reduce(               #For every item, apply the function and 'keep'
           lambda: b,c:b+c,               #Add lists from...
                map(None,*map(            #None = Identity function, over a map of...
                    lambda m:list(m), a)  #list made for mthe strings m
                   ) if i                 #truthy values only (otherwise the outer map will padd with None.
       ])

TXR Lisp, 20 bytes

(opip weave cat-str)

Run:

1> (opip weave cat-str)
#<intrinsic fun: 0 param + variadic>
2> [*1 "LYES" "APRONS"]
"LAYPERSONS"
3> [*1 "ABCDE" "a c" "" "123 567"]
"Aa1B 2Cc3D E567"
4> [*1 "\"\\n$?*" "" ",(.) "]
"\",\\(n.$)? *"

The weave function is lazy, so it returns a list, which is why we have to force the result to a string. Being lazy, it can weave infinite sequences. For instance, we can weave the even and odd natural numbers, which are themselves infinite lazy lists:

5> (take 20 (weave (range 2 : 2) (range 1 : 2)))
(2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19)

Perl 5, 53 bytes

$i=0,map{push@{$a[$i++]},$_}/./g for<>;print@$_ for@a

Try it online!

Method

Creates a two dimensional array where the number of rows is equal to the length of the longest string and the maximum number of columns is equal to the number of strings. Then output each row of the array without spacing.

Python 3, 75 Bytes

I know the other Python one is shorter, but this is the first time I've used map ever in my life so I'm pretty proud of it

lambda n:''.join(i[k]for k in range(max(map(len,n)))for i in n if len(i)>k)

Python 2, 58 bytes

lambda*m:''.join(map(lambda*r:''.join(filter(None,r)),*m))

Try it online!

Oracle SQL, 195 bytes

    select listagg(b,'') within group(order by l,o) from(select substr(a,level,1) b,level l,o from i start with length(a)>0 connect by prior a=a and level<=length(a) and prior sys_guid() is not null)

Takes its input from a table named i with columns a (containing the string) and o (order of the string):

    create table i (a varchar2(4000), a integer)

Explanation:
We're exploiting CONNECT BY to break up the strings into each of the characters making them up. PRIOR SYS_GUID() being NOT NULL ensures we don't end up stuck in a loop.
We then concatenate the single characters with LISTAGG but we shuffle them around with an ORDER BY clause, ordering them first by their position in the original string and only then by the string they came from.

Not as short as the other answers but SQL isn't really meant as a string manipulation language :)

Pyth - 3 bytes

Very simple, will add expansion later, on mobile.

s.T

Test Suite

s                         Join all the strings together
 .T                       Transpose, without chopping off overhang
  (Q implicit)

Java, 19+155=174 160

String f(java.util.Queue<String> q){String s,r="";while(!q.isEmpty()){s=q.poll();r+=s.isEmpty()?"":s.charAt(0);if(s.length()>1)q.add(s.substring(1));}return r;}

Ungolfed:

  String f(java.util.Queue<String> q) {
    String s, r = "";
    while (!q.isEmpty()) {
      s = q.poll();
      r += s.isEmpty() ? "" : s.charAt(0);
      if (s.length() > 1) {
        q.add(s.substring(1));
      }
    }
    return r;
  }

Output:

SIMPLE

PEOPLELESS

LAYPERSONS

Aa1B 2Cc3D E567

",(n.$)?"* ​

First modification: merged string declaration to save some bytes. Removed import, it was used by the main() method (not shown here) that also needed LinkedList. It is fewer bytes to referece Queue directly.

PHP, 68 67 bytes

for(;$f=!$k=$f;$i++)for(;y|$v=$argv[++$k];$f&=""==$c)echo$c=$v[$i];

Loops over command line arguments. Run with -r.

After the inner loop, $f is 1 when all strings are finished, 0 else (bitwise & casts ""==$c to int).
Next iteration of the outer loop: copy $f to $k (saves one byte from $k=0) and toggle $f:
When all strings are done, $f is now false and the loop gets broken.

PHP, 63 bytes

Note: uses IBM-850 encoding

for(;$s^=1;$i++)for(;n|$w=$argv[++$$i];$s&=$x<~■)echo$x=$w[$i];

Run like this:

php -r 'for(;$s^=1;$i++)for(;n|$w=$argv[++$$i];$s&=$x<~■)echo$x=$w[$i];' "\"\n\$?*" "" ",(.)\" " 2>/dev/null;echo
> ",\(n.$)?"* 

Explanation

for(                       # Iterate over string index.
  ;
  $s ^= 1;                 # Continue until $s (stop iterating) is 1.
                           # Flip $s so each iteration starts with $s
                           # being 1.
  $i++                     # Increment string index.
)
  for(
    ;
    "n" | $w=$argv[++$$i]; # Iterate over all input strings. OR with "n"
                           # to allow for empty strings.
    $s &= $x<~■            # If last character printed was greater than
                           # \x0 (all printable chars), set $s to 0,
                           # causing the loop to continue.
  )
    echo $x = $w[$i];      # Print char $i of current string.

Haskell, 33 bytes

import Data.List
concat.transpose

Try it on Ideone. Usage:

Prelude Data.List> concat.transpose$["ABCDE","a c","123 567"]
"Aa1B 2Cc3D E567"

Without using a build-in: (38 34 bytes)

f[]=[]
f x=[h|h:_<-x]++f[t|_:t<-x]

Try it on Ideone. 4 bytes off thanks to Zgarb! Usage:

Prelude> f["ABCDE","a c","123 567"]
"Aa1B 2Cc3D E567"

C, 75 71 bytes

Only limitation is the output length. Currently it's 99, but can be easily stretched to 999 (+1 byte).

i;main(a,b)char**b;{a--;for(;i<99;i++)*b[i%a+1]&&putchar(*b[i%a+1]++);}

Ungolfed:

i;
main( a, b )
char **b;
{
    a--;
    for( ; i < 99; i++ )
        *b[i % a + 1] && putchar( *b[i % a + 1]++ );
}

Bash + GNU utilities, 55

 eval paste `sed "s/.*/<(fold -1<<<'&')/g"`|tr -d \\n\\t

I/O via STDIN (line-separated) and STDOUT.

The sed formats each line to a bash process substitution. These are then evaled into paste to do the actual interleaving. tr then removes unnecessary newlines and tabs.

Ideone.

Perl 6, 34 32 bytes

{[~] flat roundrobin |$_».comb}

{roundrobin(|$_».comb).flat.join}

A lambda that takes an array of strings as argument, and returns a string.

(Try it online)

JavaScript (ES6), 46 bytes

f=([[c,...s],...a])=>c?c+f([...a,s]):a+a&&f(a)
<textarea oninput=o.textContent=f(this.value.split`\n`)></textarea><div id=o>

Actually, 7 6 bytes

Golfing suggestions welcome! Try it online!

Edit: -1 byte thanks to Teal pelican.

a Z♂ΣΣ

Ungolfing

          Implicit input each string.
a         Invert the stack so that the strings are in the correct order.
<space>   Get the number of items on the stack, len(stack).
Z         Zip all len(stack) strings into one, transposing them.
♂Σ        sum() every transposed list of chars into strings.
Σ         sum() again to join the strings together.

JavaScript (ES6), 52 46 bytes

f=([[c,...s],...a])=>s+a?c+f(s+s?[...a,s]:a):c

Takes input as an array of strings and outputs as a single string.

Test snippet

f=([[c,...s],...a])=>s+a?c+f(s+s?[...a,s]:a):c

g=a=>console.log("Input:",JSON.stringify(a),"Output:",JSON.stringify(f(a)))

g(["SIMPLE"])
g(["POLLS","EPEES"])
g(["LYES","APRONS"])
g(["ABCDE","a c","123 567"])
g(["\"\\n$?*",",(.)\" "]) // Backslash and quote are escaped, but in/output are correct

C, 114 84 bytes

-20 bytes for not calculating the length.

i,b;f(char**s){b=1;while(b){i=-1;b=0;while(s[++i]>0)if(*s[i])putchar(*s[i]++),++b;}}

Accepts array of char pointers and requires last item to be a null-pointer (see usage).

Ungolfed and usage:

i,b;f(char**s){
 b=1;
 while(b){
  i=-1;
  b=0;
  while(s[++i]>0)
   if(*s[i])
    putchar(*s[i]++),++b;
 }
}


int main(){
 char*a[]={ 
//  "POLLS","EPEES"
//  "LYES","APRONS"
 "ABCDE","a c","123 567"
 ,0};
 f(a);
 puts("");
}

J, 13 bytes

({~/:)&;#\&.>

Try it online!

Based on the inspiration for this question.

Another way to do it takes 27 bytes but operates using transpose. Most of the bytes are to handle the automatically added zeroes from padding.

[:u:0<:@-.~[:,@|:(1+3&u:)&>

Explanation

({~/:)&;#\&.>  Input: list of boxed strings S
          &.>  For each boxed string x in S
        #\       Get the length of each prefix from shortest to longest
                 This forms the range [1, 2, ..., len(x)]
                 Rebox it
(    )         Operate on S and the prefix lengths
      &;         Raze both
   /:            Grade up the raze of the prefix lengths
 {~              Index into the raze of S using the grades
               Return

Python 2, 101 89 86 69 bytes

I'm hoping I can get this into a lambda somehow, shortening it down by making it recursive. It isn't ideal because you would hope transposing is shorter, unfortunately it isn't (from what I have managed to come up with so far).

f=lambda s:' '*any(s)and''.join(x[:1]for x in s)+f([x[1:]for x in s])

Old solutions:

w=input();o=''
while any(w):
 for i in range(len(w)):o+=w[i][:1];w[i]=w[i][1:]
print o

lambda s:''.join(''.join([c,''][c<' ']for c in x)for x in map(None,*[list(y)for y in s]))

w=input();o=''
while any(x>=' 'for x in w):
 for i in range(len(w)):o+=w[i][:1];w[i]=w[i][1:]
print o

thanks to mathmandan for making me feel dumb ;) saved me a bunch of bytes! (on an old solution)

PHP, 77 bytes

Golfed

function($a){for($d=1;$d!=$s;$i++){$d=$s;foreach($a as$v)$s.=$v[$i];}echo$s;}

Anonymous function that takes an array of strings.

I'm sure this could be golfed more, but it's early. On each iteration, we grab the i-th letter from each given string and append it to our final string, one at a time. PHP just throws warnings if we access bits of strings that don't exist, so that's fine. We only stop when no changes have been made after looping through all the strings once.

I feel like the usage of $d can be golfed more, but it's early. :P

Jelly, 1 byte

Z

Try it online!

The “transpose” built-in will do exactly this to a list of strings.

Retina, 13 bytes

Byte count assumes ISO 8859-1 encoding.

O$#`.
$.%`
¶

Try it online!

Explanation

O$#`.
$.%`

This is based on the standard transposition technique in Retina. We sort (O) all non-linefeed characters (.), by ($#) the number of characters in front of them on the same line ($.%`), i.e. their horizontal position.

The second stage then simply removes linefeeds from the input.

CJam, 4 bytes

qN/z

Try it online!

We can also write an unnamed function for 4 bytes, which expects a list of strings on top of the stack:

{zs}

Try it online!