Skip to content

Glossary: Coding Interviews in C++

Min-heap

Also written: min heap

A heap whose top is the smallest item. In C++ it is a `std::priority_queue` with `std::greater<>`, and for top k it holds the k best so far, so the smallest kept is the one to evict.

Where the book teaches it

Related terms

Heapstd::greaterstd::priority_queue