## Radix SortBy Eric SuhRadix Sort is a clever and intuitive little sorting algorithm.
Radix Sort puts the elements in order by comparing the Consider the following 9 numbers: 493 812 715 710 195 437 582 340 385 We should start sorting by comparing and ordering the
Notice that the numbers were added onto the list in the order that they were found, which is why the numbers appear to be unsorted in each of the sublists above. Now, we gather the sublists (in order from the 0 sublist to the 9 sublist) into the main list again: 340 710 812 582 493 715 195 385 437 Note: The Now, the sublists are created again, this time based on the
Now the sublists are gathered in order from 0 to 9: 710 812 715 437 340 582 385 493 195 Finally, the sublists are created according to the
At last, the list is gathered up again: 195 340 385 437 493 582 710 715 812 And now we have a fully sorted array! Radix Sort is very simple,
and a computer can do it fast. When it is programmed properly, Radix
Sort is in fact ## DisadvantagesStill, there are some tradeoffs for Radix Sort that can make it less preferable than other sorts. The speed of Radix Sort largely depends on the inner basic operations,
and In the example above, the numbers were all of equal length, but many times, this is not the case. If the numbers are not of the same length, then a test is needed to check for additional digits that need sorting. This can be one of the slowest parts of Radix Sort, and it is one of the hardest to make efficient. Radix Sort can also take up more Since Radix Sort depends on the digits or letters, Radix Sort is
also For many programs that need a fast sort, Radix Sort is a good choice.
Still, |