Mental Model
Heap sort organizes data into a special tree shape called a heap to easily find the largest item and then sorts the list by repeatedly removing it.
Analogy: Imagine a pile of books stacked so the biggest book is always on top. You take the biggest book off, then rearrange the pile to keep the biggest book on top again, repeating until all books are sorted.
Array: [4, 10, 3, 5, 1]
Heap (max-heap):
10
/ \
5 3
/ \
4 1