Lecture 17 Objectives
At the end of today's class you should
KNOW:
- that a queue is a first-in-first-out (FIFO) data structure
- that a queue is a useful data structure when keeping track of
multiple clients waiting for a single resource (such as spooling jobs to a
printer, simulating arrivals of customers at a check-out line, routing
packets of information in a computer network)
BE ABLE TO:
- implement the queue operations (enqueue, dequeue, isEmpty) using a
linked list
- use a queue to solve various problems
Sample Exam Question:
Explain why the dequeue operation works differently for a queue containing
one item as opposed to a queue containing more than one item.