Press Start to run animation, or Step to advance one step at a time.
Counting Sort. Works only on small bounded integer keys (k = O(n)). The right-to-left placement in Phase 3 is required for stability — equal keys keep their input order. This stability is what makes Counting Sort a usable inner pass for Radix Sort. No element is ever compared to another; values are used directly as array indices.