GATE | GATE CS 2008 | Question 47

We have a binary heap on n elements and wish to insert n more elements (not necessarily one after another) into this heap. The total time required for this is

(A) \theta (logn)
(B) \theta(n)
(C) \theta(nlogn)
(D) \theta(n^2)

(A) A
(B) B
(C) C
(D) D


Answer: (B)

Explanation: See https://www.geeksforgeeks.org/data-structures-and-algorithms-set-14/ for explanation

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.