Concept Flow - Heap Extract Min or Max Bubble Down
Start: Root Node to Extract
Replace Root with Last Element
Remove Last Element
Bubble Down: Compare with Children
Left Child < Right Child?
Swap with Smaller Child
Repeat Bubble Down Until Heap Property Restored
Done
This flow shows how extracting the root from a heap replaces it with the last element, then bubbles that element down by swapping with smaller children until the heap property is restored.
