Jump to content

C++ Language/Std/Stl/CollectionClasses/SequenceCollections/Deque

From Wikibooks, open books for an open world

A "deque" (an instance of class std::deque<>) has an array-of-values that can dynamically-resize in either direction. Unlike a vector, a deque's internal implementation does not store items in contiguous memory (so there is no "capacity"). Because a deque can grow in either direction, you can call push_front() in addition to push_back().

Additional information about deque (includes interactive examples)