Counting Sort 1

  • + 0 comments

    C# code:

    public static List<int> countingSort(List<int> arr)
        {
            int[] occurences = new int[100];
            foreach (var item in arr)
                occurences[item]++;
    
            return occurences.ToList();
        }