Mental Model
Heap sort turns the list into a special tree structure 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 take the biggest book off, then rearrange the pile to keep the biggest on top, repeating until all books are sorted.
Array: [4, 10, 3, 5, 1]
Heap tree:
10
/ \
5 3
/ \
4 1