Question: Consider the radix sort algorithm. (i) Explain how radix sort works, to what inputs it can be applied and what its asymptotic complexity is. [5

Consider the radix sort algorithm.

(i) Explain how radix sort works, to what inputs it can be applied and what its asymptotic complexity is. [5 marks]

(ii) Explain why running radix sort does not proceed from most to least significant digit, as would at first seem more intuitive. [4 marks]

(iii) Give a proof by induction of the correctness of radix sort. [4 marks]

(b) Clearly describe an algorithm, strictly better than O(n 2 ), that takes a positive integer s and a set A of n positive integers and returns a Boolean answer to the question whether there exist two distinct elements of A whose sum is exactly s. Evaluate its complexity. [7 marks]

Step by Step Solution

3.49 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The detailed answer for the above question is provided below a i Radix sort is an efficient noncomparative integer sorting algorithm that sorts data with integer keys by grouping the keys by the indiv... View full answer

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 Algorithms Questions!