Definition
Priority Queue
A priority queue is a queue that pops elements according to a priority metric.
Example:
- Push: with priority 0
- Push: with priority 100
- Push: with priority 50
- Pop:
- Pop:
- Pop:
Priority Queue
A priority queue is a queue that pops elements according to a priority metric.
Example:
- Push: with priority 0
- Push: with priority 100
- Push: with priority 50
- Pop:
- Pop:
- Pop: