When the priority queue is represented by max heap, the insertion and deletion of an element can be performed in (queue containing n elements)
A. q(n) and q(1) respectively
B. q(n) and q(n) respectively
C. q(1) and q(1) respectively
D. None of the above
Answer:C
When the priority queue is represented by max heap, the insertion and deletion of an element can be performed in (queue containing n elements)
A. q(n) and q(1) respectively B. q(n) and q(n) respectively C. q(1) and q(1) respectively D. None of the above