STL containers - Study Notes

deque deque container
element deque data block using a linear structure is stored, pointing to two iterators elements end to end of the container, a highly efficient and remove head and tail elements push_front pop_front function.
Since the container is deque deque memory allocation units of blocks, and used to manage two Map.
deque deque vector is very similar to the container, not only at the end of insertion and deletion, insertion and deletion can also be the head, the time complexity of the algorithm is a constant order O (1).
The internal mechanisms and deque data vector with a different execution performance, when considering the performance of the memory allocation strategy and container element operation, a relative vector deque advantage.
deque basic application functions are:
. 1) deque ()
2) deque (n-size_type)
. 3) deque (n-size_type, const T & value)
. 4) deque (deque const &)
. 5) deque

Reproduced in: https: //www.cnblogs.com/shelvenn/archive/2007/12/24/1012908.html

Guess you like

Origin blog.csdn.net/weixin_33851177/article/details/93272904