Glossary: Algorithms Beyond the Basics in JavaScript
Min-heap
Also written: heap, MinHeap
A collection that always hands back its smallest item first, in O(log n) time for push and pop. JavaScript has none built in, so a small `MinHeap` class can be written and used for room counting, Dijkstra's algorithm and roast scheduling.