Challenge
Robin likes having his variables declaration in the shape of an arrow. Here's how he does it:
- Input any number of strings
- Order them by ascending length
Output them ordered by the middle to roughly form a negative arrowhead, like this (whichever order golfs the best):
5 or 4 3 2 1 1 2 3 4 5
Test Cases
Input:
bow
arrows
sheriffOfNottingham
kingRichard
maidMarian
princeJohn
sherwoodForest
Output:
sheriffOfNottingham
kingRichard
maidMarian
bow
arrows
princeJohn
sherwoodForest
Input:
a
bb
cc
Output (both are valid):
bb
a
cc
cc
a
bb
Input:
one
four
seven
fifteen
Possible output (the only other valid output is its vertical mirror):
seven
one
four
fifteen
Notes
The strings are in camelCase and have no numbers or special characters, only lowercase and uppercase letters.
The input can be anything you like: comma-separated as one string, array, ... Any I/O format is allowed.
- Between strings with the same length, any order is accepted.