1.

How many comparisons will be required to sort the array arr={5, 4, 7, 1, 9} using bead sort?(a) 5(b) 4(c) 6(d) 0This question was posed to me in unit test.My question is based upon Sorting in division Sorting of Data Structures & Algorithms II

Answer»

Correct answer is (d) 0

Easiest explanation - Bead sort is an EXAMPLE of a non-comparison BASED sorting algorithm. So no comparison is required to be performed in order to sort the array.



Discussion

No Comment Found

Related InterviewSolutions