Counting Sort

Algo:

Implemented Code:

 

Reference:
http://scanftree.com/Data_Structure/Counting-sort

Counting Sort in C

CLRS:
http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/countingSort.htm

Tuts:

Complexity:
Time: O(k)+O(n)+O(k)+O(n)=O(n) if K=O(n)
Space: O(n)