1,091 views
1 votes
1 votes
$(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})$

Please log in or register to answer this question.

Related questions

1 votes
1 votes
1 answer
1
iarnav asked Jun 21, 2018
450 views
In a binary Heap of 100 elements time taken to find the 99th element?or in a binary heap on "n" elements, time taken to find (n-1)th element? Note ; I'm not asking about ...
7 votes
7 votes
2 answers
2
Warlock lord asked Dec 5, 2017
1,102 views
From an array of size n , we need to find the k bigger elements. What is the data structure we should use to find k bigger element in best asymptotic complexity? 1.A max ...
0 votes
0 votes
0 answers
3
iarnav asked Jun 24, 2018
254 views
The number of possible min-heaps containing each value from {1,1,1,1,1,1,1} exactly once is _______This is a variance of Gate 2018 question and how will we deal if all va...
0 votes
0 votes
0 answers
4
aditi19 asked Dec 4, 2018
368 views
https://gateoverflow.in/459/gate2008-47here if we insert all elements together and then call heapify function then it’ll take O(logn) time. why answer is O(n)?