23.5.1 Priority Queue
- Non-linear container
- Optimized to quickly locate the highest priority element
- Does not imply a sorting
- Elements must be comparable
- Note: queue is a misnomer; FIFO is
not enforced
- Basic operations:
- push - Insert a new element
- top - Return element w/highest priority
- pop - Remove element w/highest priority
- empty, size - as usual
- Comparison operator can be specified (less than, by default)
prev
|top
|next