Sort Target
Algorithm
Speed
Normal ~12s · 250 ms/step
LSD Radix sort (b=10)(1954)
▶ Try this Source
O(nk) ✓ Stable ✗ In-place
🔧 How it works

Sorts integers digit by digit from the least significant to the most significant decimal digit, applying a stable counting sort at each pass so that the order established by previous passes is never disturbed.

🎯 Key property

Base 10 is the most intuitive base to follow visually, each pass sorts by the ones, tens, hundreds, … digit in turn, making it the clearest choice for illustrating how LSD Radix sort progressively builds global order from local digit passes.

👁 Watch for
  • IndexRead each element's current decimal digit is extracted by a modulo/division operation; the digit value increments its slot in the ten-entry counting table
  • IndexWrite the prefix-sum pass converts counts to output positions; elements are then written to the output buffer in stable order by their current digit
  • End of pass after the ones pass elements are grouped by last digit; after the tens pass by last two digits; each pass visibly extends the sorted prefix
Initial State
This is the array before sorting. Follow LSD Radix sort (b=10) step by step.
Main Array
53
0
57
1
31
2
36
3
82
4
85
5
61
6
48
7
BucketsScatter— ones digitPass 1
0
1
2
3
4
5
6
7
8
9
0 / 48 ops ( 0.0%) 0.0%
Sorting is
a spectacle.
Algorithms at work, in a daily vertical feed. Watch, play, challenge — and go deeper when you're ready.
Loading 0%
An unhandled error has occurred. Reload 🗙