1.

Which of the following sorting algorithms can be considered as improvement to the binary tree sort?(a) Heap sort(b) Quick sort(c) Selection sort(d) Insertion sortThis question was addressed to me by my college professor while I was bunking the class.The origin of the question is Sorting topic in chapter Sorting of Data Structures & Algorithms II

Answer»

The correct answer is (a) Heap SORT

Easiest explanation - Heap sort is basically IMPROVEMENT to the BINARY tree sort. Heap sort builds a heap on the input element by adjusting the position of the ELEMENTS within the original array, rather than creating nodes as in binary tree sort.



Discussion

No Comment Found

Related InterviewSolutions