Implementations of Binary Heaps

A natural implementation of binary heaps is through links (pointers or references), so each node looks like:

This approach requires extra memory to store links.

A more efficient binary heap implementation uses an array.