Lecture 15

Learning objectives

After this class, you should be able to:

  1. Given a binary search tree (BST) and an element to be inserted, draw a figure to show the BST after that element has been inserted.
  2. Given a BST and an element to be deleted, draw a figure to show the BST after that element has been deleted.
  3. Give the time complexity for insertion and deletion in a BST.
  4. Write code for insertion and deletion in a BST.

Reading assignment

  1. Sections 4.3, pages 129-133.
  2. Lecture: Trees: Part 3 -- Binary search trees.
  3. None.

Exercises and review questions


Last modified: 1 Oct 2011