+2 votes
in Data Structures & Algorithms I by (88.2k points)
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 Answer

+2 votes
by (672k points)
selected by
Best answer
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.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.