Data structures · Heaps and priority queues

Smallest first

Some waiting lines do not serve in arrival order. A priority queue is the structure behind them, and how it is stored decides its speed.