radix sort:
an example :
Original, unsorted list:
170, 45, 75, 90, 2, 24, 802, 66
Sorting by least significant digit (1s place) gives:
170, 90, 2, 802, 24, 45, 75, 66
Notice that we keep 2 before 802, because 2 occurred before 802 in the original list, and similarly for 170 and 90.
Sorting by next digit (10s place) gives:
2, 802, 24, 45, 66, 170, 75, 90
Sorting by most significant digit (100s place) gives:
2, 24, 45, 66, 75, 90, 170, 802
your program should do the following:
1.write a function which implements the LCD radix sort
2.generate 1000 random numbers and store it in a arry, the numbers should be consist from 4 digits at least
3.choose any other sorting algorithm and implement it
4.compute the number of swapping which made by radix sort and compute the number of swapping made by the selected algorithm
5.compute the time of radix sort and compare it with the time of the selected algorithm
6.the two algorithms should be applied on the same data which mean that the original array cannot be changed
7.your program must have a menu