Lecture 8

Learning objectives

After this class, you should be able to:

  1. Explain the purpose of self-organizing lists.
  2. Explain the method used by the following types of self-organizing lists: (i) move-to-front, (ii) transpose, (iii) count, and (iv) ordering.
  3. Given a sequence of operations on a self organizing list of one of the above types, or a new type that we define, show the relative positions of elements in the list.
  4. Write code to implement a specified operation on a self-organizing list, either of the above types, or of some new type.
  5. Given an application, state which type of self-organizing list would ideally suit it, and give a justification for your choice.
  6. 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. Section 3.5 (except the amortized analysis on pages 105-106), section 3.7.
  2. Section 2.8, page 63 and 64.

Exercises and review questions


Last modified: 31 Jan 2008