Queues and deques

A queue adds at the back and removes from the front, first in first out; a list's `pop(0)` shifts every item left, $O(n)$, so a queue wants both ends $O(1)$, which a deque or a circular buffer gives.

From Data Structures and Algorithms.