Question: what is the difference between the list and vector?
Answer: Both vector and list are sequential containers of C++ Standard Template Library. ... List stores elements at non contiguous memory location i.e. it internally uses a doubly linked list i.e. Whereas, vector stores elements at contiguous memory locations like an array i.e.