Question: Question 5: In class you have learnt that Radix-Sort takes O(dn) time for sorting n integers with the maximum number having d digits. This is

 Question 5: In class you have learnt that Radix-Sort takes O(dn)

Question 5: In class you have learnt that Radix-Sort takes O(dn) time for sorting n integers with the maximum number having d digits. This is good when numbers are kind of close to each other, but not that good otherwise take for example the scenario when all numbers have between 0 - 7 digits and one number has 1 billion digits! What we want is a Radix Sort algorithm that runs in 0(davgn) time, where davg is the average number of digits over all numbers. Describe the algorithm. If your algorithm does not work for every scenario, you should clearly explain for what scenarios it works. Explain why you achieve the desired complexity. Since you do not need anything beyond high-school math to explain the complexity, please don't be vague with your explanation. You may assume that all numbers are non-negative, but do not assume anything else. [20] Question 5: In class you have learnt that Radix-Sort takes O(dn) time for sorting n integers with the maximum number having d digits. This is good when numbers are kind of close to each other, but not that good otherwise take for example the scenario when all numbers have between 0 - 7 digits and one number has 1 billion digits! What we want is a Radix Sort algorithm that runs in 0(davgn) time, where davg is the average number of digits over all numbers. Describe the algorithm. If your algorithm does not work for every scenario, you should clearly explain for what scenarios it works. Explain why you achieve the desired complexity. Since you do not need anything beyond high-school math to explain the complexity, please don't be vague with your explanation. You may assume that all numbers are non-negative, but do not assume anything else. [20]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!