Lesson 5: Queues Flashcards
ordered collection of items from which items may be deleted at one end (front) and into which items may be inserted at the other end (rear)
Queue
Is Queue LIFO (last-in, first-out) or FIFO (first-in, first-out)?
FIFO
Queue Operation (clue: EDFR)
Enqueue
Dequeue
Queue FRONT
Queue REAR
[Queue Operation] inserts an element at the rear of the queue
Enqueue
[Queue Operation] If there’s not enough room for another element in the queue, the queue is in an __________ state.
Overflow
[Queue Operation] deletes an element at the front of the queue
Dequeue
[Queue Operation] If there are no data in the queue when a dequeue is attempted, the queue is in an __________ state
Underflow
[Queue Operation] examines the element at the front of the queue
Queue front
[Queue Operation] If there are no data in the queue, then the queue is in an __________ state.
Underflow
[Queue Operation] examines the element at the rear of the queue
Queue rear
Implementations of Queues (clue: CIDREFCD)
Create queue
Insert data into queue
Delete data from queue
Retrieve data at front of queue
Queue EMPTY
Full queue
Queue COUNT
Destroy queue