The shortest code by character count to generate a wave from the input string.
A wave is generated by elevating (line-1) a higher character, and degrading (line+1) a lower character. Equal characters are kept on the same line (no elevating or degrading done).
Input is made of lower case characters and numbers only, letters are considered higher than numbers.
Input:
1234567890qwertyuiopasdfghjklzxcvbnm
Output:
z
l x v n
k c b m
j
h
g
y p s f
t u o a d
w r i
9 q e
8 0
7
6
5
4
3
2
1
Input:
31415926535897932384626433832795028841971693993751058209749445923078164062862
Output:
9 9 8 6 6
9 6 8 7 3 3 4 2 4 8 9 88
3 4 5 2 5 5 2 33 3 7 5 2 4 9 9 99 7
1 1 3 2 0 1 7 6 3 3 5 8 8 6
1 1 5 2 9 9 3 7 1 4 6 8
0 0 7 9 5 2 0 0 2 6
4 44 2
Code count includes input/output (i.e full program).
Hexdump:
6800B807BF8007BE8200B40EAC3C0D741338D8740A720481EF400181C7A000AB86C3EBE8C3
Run in MS-DOS with 50 line console, the input is taken from the command line.
E.g.
wave.com 1234567890qwertyuiopasdfghjklzxcvbnm
Update: Shaved off three bytes thanks to jrandomhacker