Step 1/0
Custom array:
Complexity
Best:O(d·n)
Average:O(d·n)
Worst:O(d·n)
Space:O(n+k)
Description
Sorts numbers digit by digit from least significant to most significant, using a stable sort (like counting sort) for each digit pass.
When to use
O(d·n) where d is number of digits. Efficient for integers and strings with bounded length. Used in suffix array construction.