Lecture 11

Learning objectives

After this class, you should be able to:

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

Reading assignment

  1. Section 3.8 (up to fig 3.27), class notes for deque implementation based on a circular array (do not use the text book's implementation, until the next lecture), Section 4.1-4.2, section 4.3 (the need for a priority queue).
  2. Sec 4.4, 4.5.

Exercises and review questions


Last modified: 12 Aug 2009