Counting Sort 1

  • + 0 comments
    public static List<int> countingSort(List<int> arr)
        {
            List<int> result = Enumerable.Repeat(0, 100).ToList();
            for(int i=0; i<arr.Count; i++){
                result[arr[i]]++;
            }
            return result;
        }