1.

Heap sort is an implementation of ____________ using a descending priority queue.(a) insertion sort(b) selection sort(c) bubble sort(d) merge sortThe question was asked at a job interview.This question is from Heapsort in section Sorting of Data Structures & Algorithms II

Answer»

Right CHOICE is (b) selection sort

Explanation: HEAP sort is an implementation of selection sort using the input array as a heap representing a descending priority queue. Heap sort algorithm is divided into two PHASE. In first phase the max-heap is created and the SECOND phase (selection phase) DELETES the elements from the priority queue using siftdown operation.



Discussion

No Comment Found

Related InterviewSolutions