how many passes will be required to sort the data using radix sort 12, 345, 121, 564, 2342, 231, 7, 989, 3231
Answers
Given : 12, 345, 121, 564, 2342, 231, 7, 989, 3231
To Find : how many will be required to sort the data using radix sort
Solution:
radix sort is a non-comparative sorting algorithm
radix sort is also called sort and digital sort.
Each step requires just a single over the data as items put in without comparison.
As Largest number 3231 is 4 Digit number
Hence 4 will be required
12, 345, 121, 564, 2342, 231, 7, 989, 3231
Using Least Significant digit
1st checking unit Digit
{ 121 , 231 , 3231 } , { 12 , 2342 } , { 564 } , { 345 }, { 7} , {989}
2nd checking Tens Digit
{07 } , {12 } , { 121 } , { 231 , 3231 } , { 2342 , 345 } , { 564 } , { 989 }
3rd Checking Hundred's Digit
{ 007 , 012 } , { 121 } , { 231 , 3231 } , { 2342 , 345 } , { 564 } , { 989 }
4th Checking Thousand Digit
{ 0007 , 0012 , 0121 , 0231 , 0345 , 0564 , 989 } , { 2342} , { 3231 }
Hence Sorted :
7 , 12 , 121 , 231 , 345 , 564 , 989 , 2342 , 3231
It can be done using most significant Digit also
Starting with checking Thousand digit in this case and go upto unit digit
Learn More:
Difference between sorting and filtering in excel - Brainly.in
brainly.in/question/8773232
perform QUICK SORT on the following data set23, 12, 11, 45, 30, 8
https://brainly.in/question/31327614