AI engineering glossary · Data structures algorithms

What is priority queue?

Priority queue: A collection where each item has a priority and the item with the highest priority is removed next, regardless of insertion order. It is usually built on a heap and powers schedulers and shortest-path search.

Level: intermediateTopic: Data structures algorithms

Priority queue: an example

A hospital triage system always calls the most urgent patient next, even if a less urgent patient arrived earlier.

Related terms

More Data structures algorithms terms

Where you learn it

Priority queue is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.