Open In App

GATE | GATE CS 2008 | Question 47

Like Article
Like
Save Article
Save
Share
Report issue
Report
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

Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads