TREES · HEAPS
A complete tree in an array — the max always at the root.
Append at the end, sift up.
Take the root; last leaf sifts down.
Bottom-up build of a heap — O(n).
Extract max n times → sorted.