Mental Model
When we remove the top value from a heap, we replace it with the last value and then push that value down to restore the heap order.
Analogy: Imagine a pyramid of blocks where the top block is removed. To keep the pyramid stable, you move the bottom block to the top and then slide it down to its correct place so the pyramid stays balanced.
1
/ \
3 5
/ \ / \
4 8 6 7
Heap array: [1, 3, 5, 4, 8, 6, 7]
ā top (root)