Radix Sort Visualizer
Watch how Radix Sort uses non-comparison based sorting by processing individual digits from least to most significant.
Time: O(d × (n + k))
Space: O(n + k)
Stable: Yes
Non-comparison
Fast (600ms)Slow (3000ms)
Progress: Step 1 of 0Pass 0 of 0 | Digit: units
Current Array
64
0 34
1 25
2 12
3 22
4 11
5 90
6Buckets (0-9)
Bucket 0
Bucket 1
Bucket 2
Bucket 3
Bucket 4
Bucket 5
Bucket 6
Bucket 7
Bucket 8
Bucket 9
Array Elements
Currently Processing
Active Bucket
Sorted
Current Step:
Click Start to begin the Radix Sort visualization
Algorithm Details
Time:
O(d×(n+k))
Space:
O(n + k)
Stable:Yes
In-place:No
Type:Non-comparison
d = number of digits
n = number of elements
k = range of input (10 for decimal)
When to Use Radix Sort
- ✓Sorting integers with fixed number of digits
- ✓When n is large and d is small
- ✓Sorting strings of equal length
- ✓When stability is required
- ✗Floating-point numbers
- ✗Variable-length strings
- ✗When memory is severely limited
Real-world Applications
- •Sorting large datasets of integers
- •Database systems with numeric keys
- •Sorting IP addresses
- •Counting sort variations
- •Suffix array construction
Key Characteristics
- •Non-comparison based algorithm
- •Works by processing individual digits
- •Can outperform O(n log n) algorithms
- •Uses counting sort as subroutine