Lecture Outline
- A queue is a first-in first-out (FIFO) data structure
- A queue can use either an array or linked list to hold its data
- The enqueue() method adds a new piece of data to the back of the queue
- The dequeue() removes the front element of the queue
- When implementing a queue with an array, we keep track of the index of the front of the queue, and the index of the back of the queue
Lecture Recording
Lecture Slides
Code