What is a priority queue?
What is a priority queue?
Approach: Describe queue where elements have priority.
An abstract data type where each element has a priority. Elements with higher priority are served before elements with lower priority.
Follow-up: What is the time complexity of insertion in a binary heap-based priority queue?
Key concepts: heap, enqueue, extract-max.