What is a Priority Queue?
What is a Priority Queue?
Approach: Define an abstract data type where elements have priority.
A collection of elements where each element has a priority, and the element with the highest (or lowest) priority is served first.
Follow-up: How is it typically implemented?
Key concepts: heap, enqueue, dequeue-max.