Skip to content

Glossary: Data Structures and Algorithms in C++

Heap

Also written: heaps

A binary tree with every level full except perhaps the last, stored in a vector with no links. In a min-heap every parent is no bigger than its children, so the smallest item is at index 0.

Where the book teaches it

Related terms

Min-heapMax-heapPriority queueHeapify