Counts how many times each distinct value appears, computes a running prefix-sum of those counts to determine each value's output position, then writes every element directly to its computed position.
Never compares values against each other, positions are computed arithmetically from counts, which is why it breaks the O(n log n) comparison-based lower bound and runs in O(n + k) where k is the value range.