CodeCookbook

Binary Heap

Min-HeapO(log n)

Complete binary tree satisfying the min-heap property: every parent is smaller than its children. Insert and extract-min both run in O(log n). Right-click any node for quick actions.

Size
7
Min (Root)
3
Max Nodes
15
Heap Array (index 0 = min)
[0]=3
[1]=8
[2]=5
[3]=15
[4]=10
[5]=12
[6]=7