This is ostensibly an O(n) sorting algorithm. However, the number of steps is proportionate to the number of digits in the numbers. If you have consecutive integers to sort, this means it's proportionate to nlogn, because the number of digits is logn. However, if you have a dense space to sort with lots of collisions, this might be a nice sorting algorithm.