You are viewing a single comment's thread. Return to all comments →
int totalCount = arr.Count; List<int> a = new List<int>(totalCount); for(int i =0;i< 100;i++) { a.Add(0); } int count = 0; for (int i = 0; i < arr.Count; i++) { if (a[arr[i]] > 0) { a[arr[i]] =++a[arr[i]]; } else { a[arr[i]] = ++count; } count = 0; }
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 →