You are viewing a single comment's thread. Return to all comments →
Java soluation:
public static List<String> bigSorting(List<String> unsorted) { Collections.sort(unsorted , new Comparator<String>() { @Override public int compare(String s1, String s2) { int length = s1.length() - s2.length(); if(length != 0) return length; BigInteger n1 = new BigInteger(s1); BigInteger n2 = new BigInteger(s2); return n1.compareTo(n2); } }); return unsorted; }
Seems like cookies are disabled on this browser, please enable them to open this website
Big Sorting
You are viewing a single comment's thread. Return to all comments →
Java soluation: