Queues
First-In-First-Out (FIFO) data structures where elements are added at one end (rear) and removed from the other (front). Queues model real-world queuing scenarios like printer job queues and customer service lines. Enqueue adds elements to the rear, dequeue removes from the front. Circular queues optimize memory by reusing space.
Real World
When you send documents to a shared office printer, they enter a queue — the first document sent prints first, exactly how FIFO works.
Exam Focus
For circular queue questions, explain how front and rear pointers wrap around using modular arithmetic to reuse freed space.
How well did you know this?