Skip to content

Glossary: Data Structures and Algorithms in Rust

Heap

Also written: heaps

A binary tree with every level full except perhaps the last, stored level by level in a Vec so the extreme item is at index 0. The children of index i are at 2*i+1 and 2*i+2.

Where the book teaches it

Related terms

Max-heap, min-heapBinaryHeapPriority queue