Algorithm visualizer
Heap Sort
Builds a max heap, then repeatedly extracts the largest value.
Run
Step through the array
The heap keeps the maximum at the root, so the next final value is always easy to remove.
Step 1 / 54: Build a max heap, then move the root into the sorted suffix.
0%