Mental Model
We turn an unordered list into a heap by fixing each subtree from the bottom up, ensuring the heap property holds everywhere.
Analogy: Imagine organizing a pyramid of boxes where each box must be heavier than the boxes above it. You start fixing from the bottom rows up to the top, swapping boxes to keep the pyramid stable.
Array: [4, 10, 3, 5, 1]
Index: 0 1 2 3 4
Heap tree:
4
/ \
10 3
/ \
5 1