Radix Sort
SortingMediumProcess elements digit-by-digit to achieve linear O(N) sort speeds.
Alt+Shift+R
Configuration Panel
Digit-by-Digit Places Visualizer
1700
451
752
903
8024
245
26
667
Step: 1 / 1
Time Complexity
O(D * (N + B)) where D is digits count, B is base base (10)
Space Complexity
O(N + B) auxiliary space buffers
Conceptual Overview
Radix Sort processes integers digit-by-digit, starting from the least significant digit (LSD) to the most significant digit (MSD), using a stable sub-sorting algorithm like Counting Sort.
Algorithm Idea
Perform counting sort on the array for each digit place (ones, tens, hundreds...). Preserving stability ensures elements sort correctly across preceding digits.
Stable Sorting
Stable (requires a stable sub-sorting routine)
In-place Memory
Out-of-place (requires auxiliary output copy lists)
Source: CP-Algorithms search & sorting reference