Explore modules

Counting Sort

Visualize Counting Sort with counting array and placement.

Free theory article

Visualize Counting Sort with counting array and placement.

Concept & interpretation

Counting Sort is an integer sorting algorithm that operates by counting the number of objects that possess distinct key values, and applying prefix sum to those counts to determine the positions of each key value in the output sequence. Unlike Quick Sort or Merge Sort, it is not a comparison sort, which allows it to break the Ω(n log n) lower bound for sorting.

Read the full free theory article