Skip to content

Glossary: Data Structures and Algorithms in Rust

BinaryHeap

Also written: binary heap

Rust's heap type in std::collections, stored in a Vec. It is a max-heap, so pop returns the biggest item; push and pop are O(log n) and peek is O(1).

Where the book teaches it

Related terms

HeapReversePriority queue