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
What is the usual worst-case time for extracting the root from a binary heap?
Answer & explanation
Answer: O(log n)
After replacing the root, sifting down restores the heap property along at most one root-to-leaf path.