Related Articles

Related Articles

GATE | GATE-CS-2007 | Question 47
  • Last Updated : 24 Feb, 2014

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:
(A) \theta(logn)
(B) \theta(LogLogn )
(C) \theta(n)
(D) \theta(nLogn)
(A) A
(B) B
(C) C
(D) D


Answer: (B)

Explanation: See Question 2 of https://www.geeksforgeeks.org/data-structures-and-algorithms-set-12/

Quiz of this Question

sudo-gate-course

My Personal Notes arrow_drop_up
Recommended Articles
Page :