Click here for our new site

Counting Sort

Shawn Kothari

Counting sort operates by counting the number of objects that have each distinct key value and uses arithmetic on those counts to determine the positions of each key value in the output sequence. Its running time O(n+r).

Fork me on GitHub