Skip to content

Queue

Queue

A queue is similar to a Stack, except it’s FIFO (first in, first out). Queues work exactly like lines at a theme park: enter the back of the line and wait until you reach the front of the line.

Queues have two operations: