Sort by Length for OCaml Golf Competition by hallvabo

import java.util.*;enum S{S;{String[]a=new Scanner(System.in).useDelimiter("$").next().split("\n");Arrays.sort(a);Arrays.sort(a,new Comparator<String>(){public int compare(String s,String t){return s.length()-t.length();}});for(String s:a)System.out.println(s);}}

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

download

return to the top page