PRACTICE / UNDERSTAND / REPEAT

Data Structures & Algorithms practice question

Practice heaps with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

1 questionAnswers explainedFree · no login

Try this question

Heaps · MCQQuestion link ↗

What is the usual worst-case time for extracting the root from a binary heap?

Choose one answer
Answer & explanation

Answer: O(log n)

After replacing the root, sifting down restores the heap property along at most one root-to-leaf path.