Tag Archives: counting sort

Counting sort

Counting Sort :

n is  number of values in array , k is the range of values (max Рmin )

Compexity : O(n+k)

Counting sort is a sorting technique to sort an array in linear time. It uses an extra space for counting occurrence  of each object in array. This technique is efficient when range of data is not much larger than number of inputs to be sorted.