Presort array by leonid

loop{a=[]
k=$$
eval(gets).map{|x|x<k&&a<<B=[];B<<k=x}
puts"[#{a.sort*','}]"}

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

download

return top