Codele / Data structures

Heaps and priority queues

In a hospital waiting room the most urgent patient is seen first, not the first to arrive. A heap keeps the most urgent one on top, and it is quick to update.

Loading the playable lesson…