CS 201: Data Structures

Binary Search Trees

Hand in BST.java. Put all your prose answers in the comment at the top of BST.java.

Work alone or with a partner of your choice.

Goals

Relevant code

Getting to know BST.java

Your tasks

For each of the numbered methods-to-be-coded shown below, do the following:

Here are the methods to implement. We did the first one in class Wednesday.

  1. Recursive implementation for addRecursive(K key, V value)
  2. Recursive implementation for size()
  3. Recursive implementation for height()
  4. Recursive implementation for findRecursive(K key)
  5. Iterative implementation for find(K key)
  6. Recursive implementation for printInReverseOrder()

Don't forget...

Start early, ask questions, and have fun!