Sorting Lab

Algorithm visualizer

Heap Sort

Builds a max heap, then repeatedly extracts the largest value.

Complexity

Run

Step through the array

The heap keeps the maximum at the root, so the next final value is always easy to remove.

setup
9
4
7
2
8
1
6
3
5

Step 1 / 54: Build a max heap, then move the root into the sorted suffix.

0%