deque in C++

Deque (pronounced "deck") is a of double-ended queue. Deques are sequence containers with dynamic sizes that can be expanded on both ends.
Deques generally implement dynamic array. They allow individual elements to be accessed directly through random access iterators, with storage handled automatically by expanding. Therefore, they provide a functionality similar to vectors, but with efficient insertion and deletion of elements also at the beginning of the sequence, and not only at its end. But, unlike vectors, deques are not guaranteed to store all its elements in contiguous storage locations: accessing elements in a deque by offsetting a pointer to another element causes undefined behavior.