C++ Double-ended Queues

Double-ended queues (or deques) are like C++ Vectors, except that they allow fast insertions and deletions at the beginning (as well as the end) of the container.

Constructorscreate deques and initialize them with some data
Operatorscompare, assign, and access elements of a deque
assignassign elements to a deque
atreturns an element at a specific location
backreturns a reference to last element of a deque
beginreturns an iterator to the beginning of the deque
clearremoves all elements from the deque
emptytrue if the deque has no elements
endreturns an iterator just past the last element of a deque
eraseremoves elements from a deque
frontreturns a reference to the first element of a deque
insertinserts elements into the deque
max_sizereturns the maximum number of elements that the deque can hold
pop_backremoves the last element of a deque
pop_frontremoves the first element of the deque
push_backadd an element to the end of the deque
push_frontadd an element to the front of the deque
rbeginreturns a reverse_iterator to the end of the deque
rendreturns a reverse_iterator to the beginning of the deque
resizechange the size of the deque
sizereturns the number of items in the deque
swapswap the contents of this deque with another