2023-09-22 09:51:10 -04:00
..
2023-09-22 09:51:10 -04:00
2023-09-22 09:51:10 -04:00

Queue

Wikipedia on queues.

The opposite of the Stack, the Queue is a FIFO data structure - First In, First Out.

Visualization

A music playlist works like a queue.

	|Tommy Tutone - 8675309 Jenny|
			|
	|Europe - The Final Countdown|
			|
	|Dio - Holy Diver|

The enqueue operation will add a song to the end. The dequeue operation will pop off the front.

Implementation

You will need to create a Queue class that holds the following methods:

  • enqueue

  • dequeue

  • is_empty

  • get_front.