What advantages do lists have over vectors? What disadvantages do they have?
You can rearrange the order of the elements more easily with lists than with vectors. With lists you can add or delete any element at any point in the list but with vectors, adding or removing elements in the middle forces you to move the other elements. One disadvantage of lists is that accessing a particular element requires pointer traversal from either end of the list or from the current position in the list. This could lead to delay problems especially if one is searching the list elements. Another disadvantage of using lists is the extra programming overhead required to maintain next and previous pointers to all the elements. Adding new list elements requires careful programming to ensure that the list pointers are all assigned correctly.