About this visualizer

What it is

A learning assistant for the binary-heap part of the course. Choose min or max, then watch every operation as the sequence of compares and swaps it really is: insert (append, then sift-up), extract (swap the root with the last element, shrink, sift-down), heapify (sift down every parent, last parent first), and heap sort (repeated extracts building the sorted tail). The tree view and the array view show the same heap at the same moment — connecting those two pictures is the whole point.

Where the steps come from

The steps replay the instructor's reference Python implementation — the same heap.py run line by line in class — ported faithfully: the same child is chosen on ties, extraction swaps before shrinking, and extracted values stay parked in the array beyond the heap, which is exactly how heap sort produces its output in place.

Privacy

  • Everything runs in your browser; the numbers you enter never leave it.
  • No login, no accounts, no database, no AI.

Family

Part of the DSA tools family — the grid menu in the top bar lists the rest. The tools assist your course reasoning; they don't replace it.