Radix sorting involves looking at a radix (or digit) of a number and placing it in an array of linked lists to sort it.
Let's see a step by step example of a radix sort of the following set of unsorted numbers.
The bold digits here represent the first digit to look at when attempting to sort the list.
You must also append it to the end of that linked list in the array.
Step 3 is the final step and the list is sorted.
The benefits of a radix sort is the fact that it can be done by pencil and paper. It also only contains a fixed data structure (an array of size 10). The downside of radix sort is that it takes time to implement since you may manually go through numerous steps to sort the list depending on how many numbers you have to sort.
Here is another example of radix sort, this time using numbers up to 4 digits in length. You will notice something interesting hereĀ
Step 4 is the final step here.
Notice however that the index 0 goes from 0 to 999 while 1 goes from 1000 to 1999 etc...