Lecture 7

Learning objectives

After this class, you should be able to:

  1. Explain the limitations of vectors.
  2. Explain how linked lists help overcome some of these limitations.
  3. Explain the idea behind linked lists.
  4. Give a set of operations on a linked list, draw a figure that shows the state of the linked list.
  5. Analyze the time complexity of operations, and the space requirements for the linked list class.
  6. Implement the linked list class.
  7. Give applications where a linked list might be useful.
  8. Write code using the following features of an STL list class: back, front, push_back, pop_back, push_front, pop_front, begin, end, pop_back, pop_front, list(), erase, remove, size, merge, sort, and unique.

Reading assignment

  1. Chapter 3, sections 3.2, 3.3, 3.5.
  2. Lecture: Linked lists.
  3. Pages 94 and 104.

Exercises and review questions


Last modified: 19 Sep 2011