Radix Sort ( Due 13 Apr 2020 )

In this assignment you will modify the Radix Sort algorithm so that it sorts strings that have a mix of lower case letters and digits - similar to your UT EIDs.

In this version of Radix Sort we use Queues very naturally. Let us consider the following set of positive integers:

311, 96, 495, 137, 158, 84, 145, 63
We will sort these numbers with three passes. The number of passes is dependent on the number of digits of the largest number - in this case it is 495.

In the first pass we will go through and sort the numbers according to the digits in the units place (or the right most digit) and place the numbers in 10 queues for each of the digits 0 through 9. After this has been done we will dequeue the numbers in all the queues and enqueue them in an eleventh queue.

In the second pass, we will go through and sort the numbers according to the digits in the tens place and enqueue the numbers in the 10 queues. After this has been done, we will dequeue the numbers in all the queues and enqueue them in the eleventh queue - and so on.

Here are what the passes will look like:

Pass 0:
Q10: 311, 96, 495, 137, 158, 84, 145, 63

Pass 1:
Q0: 
Q1: 311
Q2:
Q3: 63
Q4: 84
Q5: 495, 145
Q6: 96
Q7: 137
Q8: 158
Q9:

Q10: 311, 63, 84, 495, 145, 96, 137, 158

Pass 2:
Q0:
Q1: 311
Q2: 
Q3: 137
Q4: 145
Q5: 158
Q6: 63
Q7:
Q8: 84
Q9: 495, 96

Q10: 311, 137, 145, 158, 63, 84, 495, 96

Pass 3: Assume that the 2-digit numbers have a leading zero
Q0: 63, 84, 96
Q1: 137, 145, 158
Q2:
Q3: 311
Q4: 495
Q5:
Q6:
Q7:
Q8:
Q9:

Q10: 63, 84, 96, 137, 145, 158, 311, 495

Now dequeue Q10 and the numbers are sorted.

For this assignment you will modify this algorithm so that it will take strings as input that have lower case letters and digits. Assume that the input is correct. Remember that according to the ASCII table digits come before letters.

Here are some recommendations that we would like to make. You do not have to follow our recommendations.

Input:
You will be given an input of the following format. The first line in the input will be a single integer n that states the number of strings to follow. This will be followed by n lines where there will be a single string per line. Each string will have between 1 and 10 characters inclusive. The characters will be either the digits 0 through 9 or the letters 'a' through 'z'.

Output:
You will output a list having the strings in sorted order.

For this assignment you may work with a partner. Both of you must read the paper on Pair Programming. . Only one of you will submit the program. Make sure you have your partner's name and UT EID in the header of your program on HackerRank.

Use the HackerRank system to submit your code. We should receive your work by 11 PM on Monday, 13 Apr 2020. There will be substantial penalties if you do not adhere to the guidelines. HackerRank will not assign late penalties (if any), we will make those adjustments.