Worst case time complexity to maintain the HEAP property after extracting the…

2026

Worst case time complexity to maintain the HEAP property after extracting the minimum element from a binary MIN-HEAP ?

  1. A.

    θ(n)

  2. B.

    θ(log n)

  3. C.

    θ(n²)

  4. D.

    θ(n log n)

Attempted by 90 students.

Show answer & explanation

Correct answer: B

Extracting the minimum element from a binary min-heap requires replacing the root with the last element and sifting it down to restore the heap property. This process takes O(log n) time in the worst case.

Explore the full course: Niacl Ao It Specialist