When the priority queue is represented by max heap, the insertion and deletion of an element can be performed in (queue containing $n$ elements)
Ans: D We can use heaps to implement the priority queue. It will take O(log N) time to insert and delete each element in the priority queue. ref: https://www.hackerearth.com/practice/notes/heaps-and-priority-queues/
64.3k questions
77.9k answers
244k comments
80.0k users