Queues Flashcards
What is a queue?
A linear data structure which has a first-in-first-out (FIFO) characteristic where elements are inserted at the rear and removed from the front
What are the three types of queues?
- Regular queue
- Priority queue
- Circular queue
What is a regular queue?
A queue that has no special property to it. Elements are added to the back and removed from the front.
What is a priority queue?
A queue where elements with a higher priority are closer to the front of the queue than elements with a lower priority.
What is a circular queue?
A queue where the back points back to the front of the queue.
Common STL queue functions
Queues practice: regular queue
Queues practice: priority queue
Queues practice: print level order
Queues practice: round Robin