Programming Exercise: Lists & Recursion - Beginner

In this exercise we will play with STL lists and write some useful recursive functions.

STL Lists

Here is a very quick primer on the basic functionality for STL lists. (Note that the STL list type is a doubly-linked list, so insert and remove operations on both ends are efficient. A more space-efficient type, slist is also available, which has essentially the same interface.)

Note that STL lists, like STL vectors are templated types, and as such require a type to be specified when declaring an object of that type. These methods will let you perform most common operations on lists.

3 points

Extra Credit Options