Queue

A queue is a collection of items in which only the oldest item may be accessed or removed. New items are added to the back and old items are removed from the front. Also known as "first-in, first-out" (FIFO) or "last-in, last-out" (LILO). Compare list and deque.

Queues are often used in implementing a breadth-first search.