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

Written on July 3, 2021, Last update on August 30, 2024
c++ algorithm queue