String Zip and Sort
GS2, 4 bytes
*Ü■/
This reads the strings from STDIN, separated by linefeeds.
The source code uses the CP437 encoding. Try it online!
Test run
$ xxd -r -ps <<< '2a 9a fe 2f' > zip-sort.gs2
$ echo -e 'HELLO\nworld\n!!!!!' | gs2 zip-sort.gs2
!Hw!Eo!Lr!Ll!Od
How it works
* Split the input into the array of its lines.
Ü Zip the resulting array.
■ Map the rest of the program over the resulting array.
/ Sort.
Haskell, 39 36 bytes
import Data.List
(>>=sort).transpose
Usage example: ((>>=sort).transpose) ["HELLO","world","!!!!!"]
-> "!Hw!Eo!Lr!Ll!Od"
.
Transpose the list of strings, map sort
over it and concatenate the resulting list of strings (>>=
in list context is concatMap
).
Pyth, 5 bytes
Zips(C
) the input(Q
), M
aps S
ort, then s
ums.
sSMCQ
Try it online.