Open In App

GATE | GATE-CS-2007 | Question 47

Like Article
Like
Save
Share
Report
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

Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads