Binary Heap

← Back to Heaps

Complete binary tree stored as an array. For node at index i: left child at 2i+1, right child at 2i+2, parent at (i-1)/2. Simple, cache-friendly, and the most common heap implementation.

property heaps