Multiple choice

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. $\Theta$ (log2 n)
  2. $\Theta$(log2 log2 n)
  3. $\Theta$ (n)
  4. $\Theta$(nlog2 n)
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation