📅  最后修改于: 2022-03-11 14:44:54.884000             🧑  作者: Mango
/* A deque is a dynamic array whose size can be efficiently
changed at both ends of the array. Like a vector, a deque provides
the functions push_back and pop_back, but it also includes the
functions push_front and pop_front. */
deque d;
d.push_back(5); // [5]
d.push_back(2); // [5,2]
d.push_front(3); // [3,5,2]
d.pop_back(); // [3,5]
d.pop_front(); // [5]