You are viewing a single comment's thread. Return to all comments →
public static List<Integer> countingSort(List<Integer> arr) { List<Integer> list=new ArrayList<>(); for(int i=0;i<=99;i++){ list.add(0); } for(int i=0;i<arr.size();i++){ list.set(arr.get(i), list.get(arr.get(i))+1); } return list; }
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 →
Java