Heaps and priority queues

A min-heap is a complete binary tree kept in an array, every parent no larger than its children, so the smallest item is at index $0$, node $i$'s children are at $2i + 1$ and $2i + 2$, and an insert sifts up one path, $O(\log n)$.

From Data Structures and Algorithms.