1.

Which of the following sorting algorithm requires the use of binary search in their implementation?(a) radix sort(b) library sort(c) odd-even sort(d) bead sortI got this question during a job interview.Asked question is from Sorting in portion Sorting of Data Structures & Algorithms II

Answer»

Correct choice is (b) library sort

The best I can explain: Library sort makes use of a binary SEARCH algorithm. It is used to FIND the correct INDEX in the array where the element should be inserted. Then after the INSERTION of the element re-balancing of the array TAKES place.



Discussion

No Comment Found

Related InterviewSolutions