Mental Model
Heap sort organizes data into a special tree shape called a heap, then repeatedly removes the largest item to build a sorted list.
Analogy: Imagine a pile of books stacked so the biggest book is always on top. You keep taking the biggest book off the top and placing it aside, ending up with a neat stack from smallest to biggest.
Array: [4, 10, 3, 5, 1]
Heap (max-heap):
10
/ \
5 3
/ \
4 1