in Algorithms
1,200 views
1 vote
1 vote
$(1)$ In a binary heap with $'n'$ elements with the smallest element at the root, the $7th$ smallest element can be found in time?

$A)\theta(nlogn)$            $B)\theta(n)$              $C)\theta(logn)$             $D)\theta(1)$

$(2)$ In binary max heap containing $'n'$ numbers, the smallest element can be found in time?

$A)\theta(n)$                $B)\theta(logn)$          $C)\theta(loglogn)$          $D)\theta(1)$

$(3)$ Consider the process of inserting an element into a max heap. If we perform a binary search on the path from new leaf to root, find the position of a newly inserted element, the number of comparisons performed are____________

$(4)$ 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)$              $A)\theta(nlogn)$                      $A)\theta(n^{2})$
in Algorithms
1.2k views

4 Comments

we need to delete 6th min then find 7th min.
0
0
Yes you are right but it is taking log n time but a better way is possible which is taking constant time so go for that one
0
0

Please log in or register to answer this question.

Related questions