Priority Queue
A priority queue is a container adaptor that provides constant time lookup of the largest (by default) element, at the expense of logarithmic insertion and extraction. - cppreference.com
See also
- Heap (data structure)
- Calendar Queues: A Fast O(1) Priority Queue Implementation (1998) - It is possible to make a calendar queue which will absolutely mop the floor with any other queue, but the algorithms given in these papers is just a starting point.
- something like it already exists inside Linux. - The algorithm is something like the timer wheels in the Linux kernel.
Written on July 3, 2021, Last update on August 30, 2024
c++
algorithm
queue