Similarities: 1. It is slow to insert or remove elements in the middle section because all elements need to be moved to free up or fill up space. 2. The iterator belongs to Radom access iterator (then access iteration). Differences 1. deques can quickly insert and remove elements at both ends, while vector can only operate at the end. These operations can be completed in anortized constant time. 2. when an element is accessed, there is an indirect process in the deque internal structure, so the element access and iterator operations will be a little slower. 3. The deque iterator must jump between different regions. Therefore, it must be a pointer of a special rank, not a general pointer. 4. For systems with limited memory blocks (such as PC systems), deque can contain more elements because it uses more than one memory, so deque's max_size () may be larger. 5. The deque memory zone will be released when it is not used. The memory size of deque can be reduced. But whether this is the case depends on the actual compiling environment.