Skip to content
UPEEC

Heap Sort

Build a max-heap, then repeatedly move the max to the end — $O(n\log n)$, in place, not stable.

Intermediate
Comments 0

Guaranteed worst case; used as introsort's fallback.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.