You are viewing a single comment's thread. Return to all comments →
My Java 8 Solution:
public static List<Integer> countingSort(List<Integer> arr) { List<Integer> result = new ArrayList<>(Collections.nCopies(100, 0)); for (int number : arr) { result.set(number, result.get(number) + 1); } return result; }
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Sort 1
You are viewing a single comment's thread. Return to all comments →
My Java 8 Solution: