Priority Queues
- A priority queue collects elements, each of which has a priority
- Example: collection of work requests, some of which may be more urgent than others
- When removing an element, element with highest priority is retrieved
- Customary to give low values to high priorities, with priority 1 denoting the highest priority
- Standard Java library supplies a PriorityQueue class
- A data structure called heap is very suitable for implementing priority queues