There are a few rules of thumb that apply to selecting which container to use:
1. If the program requires random access to elements, use a vector or a deque.
2. If the program needs to insert or delete elements in the middle of the container, use a list.
3. If the program need to insert or delete elements at the front and the back, but not in the middle, of the container, use a deque.
4.If we need to insert elements in the middle of the container only while reading input and then need random access to the elements, consider reading them into a list and then recordering the list as appropriate for subsequent access and copying the reordered list into a vector.