Radix sort

medium

Least-significant digit first looks backwards but is the only order that works with a stable sub-sort: each pass refines the last without destroying it. Genuinely linear for fixed-width keys.

Best O(d(n + b))Average O(d(n + b))Worst O(d(n + b))Space O(n + b)StableNeeds extra memory
Loading the radix sort engine…

Where to go next