Lecture 12

Learning objectives

After this class, you should be able to:

  1. Given certain operations on a stack or a deque, draw a figure that shows the state of the data structure at the end of those operations.
  2. Give the time complexity of the different operations on a stack or a queue.
  3. Implement features of a stack or a queue, using other data structures, such as deques or linked lists.
  4. Give applications where stacks or queues can be useful.
  5. Given a problem, use stacks or queues to solve the problem.

Reading assignment

  1. Section 4.1-4.2, section 4.3 (the need for a priority queue).
  2. Sec 4.4.

Exercises and review questions


Last modified: 14 Feb 2008.