in DS retagged by
1,902 views
3 votes
3 votes

Consider the process of inserting an element into a $Max\ Heap$, where the  $Max\ Heap$ is represented by an $array$. Suppose we perform a binary search on the path from the new leaf to the root to find the position for the newly inserted element, the number of $comparisons$ performed is

  1. $\Theta(\log _{2}n)$
  2. $\Theta(n\log _{2} \log_2 n)$
  3. $\Theta (n)$
  4. $\Theta(n\log _{2}n)$
in DS retagged by
by
1.9k views

1 comment

0
0

1 Answer

1 vote
1 vote

Ans- Option B

first find the length of tree it will take O(log n) time 

and after applying binary search on path it will take  O(log(log n)) time  

Answer:

Related questions