Min-heap: push and pop
Push sifts up, pop sifts down; watch the tree and its array move together.
Operations50, 20, 70, 10, 40, 5, pop, pop, 30
Start with an empty min-heap: every parent is at most its children.
- compare
- swap or write
- settled
Space play · ← → step · Home End jump · drag the strip to scrub