C++ Language/Std/Stl/CollectionClasses/SequenceCollections/Deque
Appearance
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)