Bead Sort by nn

a="$System.in".split()
n=a.size()
n.times{a[j=0].any{c->k=n
for(v=n+~it;k--*v;c<'|'&&v--)c=a[k][j]
j++
print c}
println''}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page