30
1
Inspiration.* I cannot believe we have not had this challenge before:
Task
Given one or more printable ASCII strings, interleave them by taking one character from each string, cyclically until out of characters. If a string runs out of characters before the others, just skip that one from then on.
Examples
SIMPLE
gives SIMPLE
POLLS
and EPEES
gives PEOPLELESS
LYES
and APRONS
gives LAYPERSONS
ABCDE
and a c
and 123 567
gives Aa1B 2Cc3D E567
"\n$?*
and
(empty string) and ,(.)"
(trailing space) gives ",\(n.$)?"*
(trailing space)
* There are shorter APL solutions.
Since this is basically just a transpose operation, we've had a few challenges that are very similar, but possibly none that are exactly the same. – Martin Ender – 2016-12-08T12:10:32.533
7I had this question on my CS HW, does that mean I can close this as a homework question? ;P – Downgoat – 2016-12-08T14:40:38.203
@EriktheOutgolfer Cool! I learned something today. – Adám – 2017-04-16T06:42:18.823