Mental Model
Counting sort counts how many times each number appears, then uses these counts to place numbers in order without comparing them.
Analogy: Imagine sorting colored balls by putting them into labeled boxes for each color, then taking them out in order to get a sorted line.
Unsorted array: [4] -> [2] -> [2] -> [8] -> [3] -> null Count array (index = number): Index: 0 1 2 3 4 5 6 7 8 Count: 0 0 0 0 0 0 0 0 0
