Lecture 19

Learning objectives

After this class, you should be able to:

  1. Given a BST and a sequence of insert and delete operations on it, draw the tree that results from these operations.
  2. Find the smallest and largest elements in a tree, and the successor and predecessor of an element.
  3. Write code to implement features of a binary search tree, such as insertion, deletion, finding the smallest and largest element, and finding the successor and predecessor of an element.
  4. Derive the time complexities for the above operations on a binary search tree.
  5. Give that advantages and disadvantages of a binary search tree over other data structures that we have discussed in class.
  6. Identify applications where a binary search tree will be useful.

Reading assignment

  1. Section 6.5 (excluding threaded trees) and section 6.6 (excluding 6.6.1).
  2. None.

Exercises and review questions


Last modified: 18 Mar 2008