Concept Flow - Heap extraction (bubble down)
Start: Extract root (min or max)
Replace root with last element
Remove last element from heap
Set current = root
Compare current with children
Swap with smaller/larger child
Update current to child
Repeat comparison
Done
This flow shows how the root element is removed from a heap, replaced by the last element, and then moved down by swapping with children until heap property is restored.