In the c ++ standard library, both the vector and list containers can be used to store a group of data of the same type. What's different from arrays is that they support dynamic growth. However, there are several differences: (1) vector is a sequence table, indicating a continuous memory, and elements are stored in sequence; list is a two-way connection table, which is not necessarily continuous in memory. (2) When the value memory is not enough, the vector will apply for a large enough continuous memory to copy the original data to the new memory. The list does not need to consider memory continuity, therefore, the new overhead is smaller than that of vector. (3) A list can only access elements through pointers. The efficiency of random element access is very low. It is more appropriate to use a vector when frequent random element access is required. (4) When you insert or delete an element to a vector, You need to copy and move all the elements on the right of the element to be inserted. Therefore, it is more appropriate to use list when you insert or delete an element frequently.