Counting Sort 1

  • + 0 comments

    C# Solution using Dictionary:

    Dictionary<int, int> count = new Dictionary<int, int>();
          for(int i = 0; i < 100; i++) {
            count.Add(i, arr.Count(x => x == i));    
          }
          return count.Values.ToList();