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).
Glossary: Data Structures and Algorithms in Rust
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).