DSA Heap Visualizer

Pick min or max, then watch the heap work: insert numbers one by one (sift-up), extract the root (sift-down), heapify a whole list, or run heap sort — every compare and swap animated in the tree and in the array underneath it.

Build & operate

Switching the kind starts a fresh session.

Array view

[] — empty.

Tree view

The heap is empty — insert a number or heapify a list.

step 0 / 0

An empty min-heap. Insert numbers one by one, or heapify a whole list.