Heap sort is an implementation of ____________ using a descending priority queue.

Heap sort is an implementation of ____________ using a descending priority queue.
A. insertion sort
B. selection sort
C. bubble sort
D. merge sort
 
Answer: b
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.
 

Tìm kiếm

Back
Top