Queues

Nathan Sprague

2/10/20

Queue Interface

Warm-up question

Dynamic-Array Based AQueue

Dynamic-Array Based AQueue

Linked Queue Socrative Question

Which of the following describes the most reasonable organization of a linked queue?

  1. enequeue and dequeue are performed at the head. There is no need to maintain a tail reference.

  2. enequeue is performed at the tail. dequeue is performed at the head.

  3. enequeue is performed at the head. dequeue is performed at the tail.

  4. Both a head and tail reference are required, but it doesn't matter which is used for enequeue and which is used for dequeue.

Linked Queue

Linked Queue