1.

Which one of the following is a variation of Heap sort?(a) Comb sort(b) Smooth sort(c) Binary tree sort(d) Shell sortThis question was posed to me in exam.Question is taken from Heapsort topic in chapter Sorting of Data Structures & Algorithms II

Answer»

Correct ANSWER is (b) Smooth sort

Easy EXPLANATION - Smooth sort is a variation of Heap sort. Smooth sort has O(nlogn) WORST case TIME complexity like Heap sort. But Smooth sort takes O(n) time to sort the nearly sorted input array.



Discussion

No Comment Found

Related InterviewSolutions