Implement a Generic Queue
HANDS-ON PRACTICE
Implement a Generic Queue
Wrap the singly linked list from Chapter 3, or a standard container, in a generic FIFO queue. Do not reimplement the backing list.
- Provide size, empty, and clear operations.
- Enqueue at the rear, dequeue at the front, and inspect the front.
- Define explicit underflow behavior for an empty queue.