Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Short for "Double-Ended Queue", std::deque allows efficient insertion and deletion at BOTH the beginning and the end.
push_front() / push_back()pop_front() / pop_back()at(i) or [i]: Random access.Unlike std::list, deque supports constant time random access to elements.
It acts as a hybrid between a vector and a list.
Internally, a deque is usually a set of fixed-size chunks of contiguous memory. It's more complex than a vector but avoids the heavy reallocation costs for front-insertions.