Descending priority queue can be implemented using ______

Category: QuestionsDescending priority queue can be implemented using ______
Editor">Editor Staff asked 5 months ago

Descending priority queue can be implemented using ______
 
(a) max heap
 
(b) min heap
 
(c) min-max heap
 
(d) trie
 
My question is based upon Heap topic in section Heap of Data Structures & Algorithms I
 
I had been asked this question during an interview for a job.

1 Answers
Editor">Editor Staff answered 5 months ago

The correct choice is (a) max heap
 
Easiest explanation – Descending priority queue arranges the elements based on their priority or value and allows removing the elements in descending order. So, it can be efficiently implemented using max heap.


Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40702