1, Vector is a contiguous block of memory, and Deque is a plurality of contiguous memory blocks, list is all data elements are saved separately, can be any two elements are not contiguous.
2, vector query performance is the best, and the end of the increase of data is also very good, unless it re-application memory segment, suitable for efficient random storage.
3, list is a linked list, any element can be discontinuous, but it has two points to the previous element and the next element of the pointer. So it is the best performance for inserting and deleting elements, and the query performance is very poor; it is suitable for a large number of insertions and deletions without worrying about the need for random access.
4, Deque is between the two, it takes into account the advantages of arrays and lists, it is a block of linked lists and multiple arrays of the union. All of it has better query performance than the list, there is better insert removal performance than vector. Deque is the best choice if you need random access and care to insert and delete data at both ends.
Vector, list, deque comparison