in DS recategorized by
689 views
1 vote
1 vote

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

  1. $\Theta (\log n)$
  2. $\Theta (n)$
  3. $\Theta (n \log n)$
  4. $\Theta (n^{2})$
in DS recategorized by
by
689 views

1 comment

B is the correct option.
0
0

1 Answer

1 vote
1 vote

Option B

we can use build heap method which will take O(n) time complexity

https://gateoverflow.in/459/gate2008-47

Answer:

Related questions