In a binary min-heap containing 'n' numbers, the largest can be found in…

2022

In a binary min-heap containing 'n' numbers, the largest can be found in ______ time.

  1. A.

    θ(n)

  2. B.

    θ(log n)

  3. C.

    θ(log log n)

  4. D.

    θ(1)

Attempted by 1024 students.

Show answer & explanation

Correct answer: A

In a min-heap , the minimum is at the root, but the maximum can be anywhere in the heap. Therefore, we must scan all n elements → θ(n) time

Explore the full course: Up Lt Grade Assistant Teacher 2025