Mental Model
Heap sort organizes data into a special tree shape called a heap, then repeatedly removes the largest item to sort the list.
Analogy: Imagine a pile of books stacked so the biggest book is always on top. You keep taking the biggest book off the pile and placing it in order, making the pile smaller each time.
Array: [4, 10, 3, 5, 1]
Heap view:
10
/ \
5 3
/ \
4 1
