Skip to main content
HS
HiSETSuccess
LeetCode Prep

Algorithm Visualizer

Step through two pointers, sliding window, binary search, BFS/DFS, heaps, DP, and union-find one operation at a time.

← All visualizers

Min-Heap: Push & Pop

Watch sift-up and sift-down keep the minimum at the root, in both array and tree form.

O(log n) per push/pop · O(1) peek

Numbers push, the word pop extracts the minimum. Up to 14 operations.

Presets
(empty heap)
Poppednone yet
Up nextpush 5push 3push 8push 1push 9push 2poppoppush 4

1/37A min-heap keeps the smallest value at the root. Every parent ≤ its children; the array is the tree read level by level.

Keyboard: ← → step · Space play/pause