1x
Heap / Priority Queue Visualizer

Min Heap — Priority Queue

Step 1 of 6

A Min Heap is a complete binary tree where every parent is smaller than its children. The minimum element is always at the root, giving O(1) access to the smallest value.

Heap Property & Array Representation

Every node satisfies: parent ≤ children. Stored as an array — node at index i has children at 2i+1 and 2i+2. Parent of i = floor((i-1)/2). This layout gives O(1) parent/child access.

31061512parent ≤ children always
3
0
10
1
6
2
15
3
12
4
← array