0
2.2kviews
Sort the following elements using Radix Sort : 121 70 965 432 12 577 683 What is the limitation of radix sort?
1 Answer
written 8.3 years ago by |
Sorting by least significant digit (1’s place)
$\hspace{5cm}7\underline{0}12\underline{1}43\underline{2}1\underline{2}68\underline{3} \ 96\underline{5}57\underline{7}$
Sorting by 10’s place,
$\hspace{5cm}\underline{1}2 \ 1\underline{2}1 \ 4\underline{3}2 \ 9\underline{6}5 \ 5\underline{7}7\underline{7}0 \ 6\underline{8}3$
Sorting by most significant digit (100’s place),
$\hspace{5cm}\underline{0}12 \ \underline{0}70 \ \underline{1}21 \ \underline{4}32 \underline{5}77 \ \underline{6}83 \ \underline{9}65$
The elements are now sorted.