Skip to content

Glossary: Data Structures and Algorithms in Rust

Max-heap, min-heap

Also written: min-heap, max-heap

A min-heap has every parent no bigger than its children, so the smallest item is at the root. A max-heap is the reverse, and Rust's BinaryHeap is a max-heap.

Where the book teaches it

Related terms

HeapReverseBinaryHeap