std::deque is a double-ended queue. It provides efficient insertion and deletion of elements at the beginning also, not just at the end, as std::vector does. Vectors are guaranteed to store the elements in a contiguous storage, therefore you can access its elements by index/offset. std::deque does not offer this guarantee.