1.

What is the advantage of comb sort over merge sort?(a) Comb sort is an in place sorting algorithm(b) Comb sort is a stable sorting algorithm(c) Comb sort is more efficient(d) It has no advantageThe question was posed to me in class test.I'd like to ask this question from Sorting topic in section Sorting of Data Structures & Algorithms II

Answer» RIGHT choice is (a) Comb sort is an in PLACE sorting algorithm

The best explanation: Comb sort does not require AUXILIARY space for manipulating input so it is an in place sorting algorithm but MERGE sort does require O(n) of auxiliary space which makes comb sort better in terms of space complexity.


Discussion

No Comment Found

Related InterviewSolutions