MCQ · 2 marks · Tree Data Structures

GATE CS 2023 CS — Q46

Let AA be a priority queue for maintaining a set of elements. Suppose AA is implemented using a max-heap data structure. The operation EXTRACT-MAX(A) extracts and deletes the maximum element from AA. The operation INSERT(A, key) inserts a new element key in AA. The properties of a max-heap are preserved at the end of each of these operations.

When AA contains nn elements, which one of the following statements about the worst case running time of these two operations is TRUE?
Select one option