vector — array. list — linked list.
1// vector — contiguous2std::vector<int> v = {1, 2, 3};3v[2] = 10; // O(1) random access45// list — nodes6std::list<int> l = {1, 2, 3};7// l[2] = 10; // Error!8auto it = std::next(l.begin(), 2);9*it = 10; // O(n) to find