You are viewing a single comment's thread. Return to all comments →
I hoped for the same, but my Java solution(below) is still timedOut for testcase 6. Can anyone point out the improvement?
static String[] bigSorting(String[] unsorted) { // Arrays.sort(unsorted); Arrays.sort(unsorted, (x, y) -> { if (x.length() == y.length()) { return x.compareTo(y); } return x.length() - y.length(); }); 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 →
I hoped for the same, but my Java solution(below) is still timedOut for testcase 6. Can anyone point out the improvement?