Consider the process of inserting an element into a Max Heap, where the Max…

2007

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. A.

    θ(logn)

  2. B.

    θ(loglogn )

  3. C.

    θ(n)

  4. D.

    θ(nlogn)

Attempted by 246 students.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir