CSE 326, Spring 1998: Homework 4

Due 4/24/98

When asked to design an algorithm please provide the pseudocode with enough explanation that it can be understood easily.

  1. (10 points) A generalization of the find operation in a binary search tree is the range query. Given a <= b, a range query returns a list of keys x such that a <= x <= b.
  2. (10 points) In this problem you will explore lazy deletion in an ordinary binary search tree. Assume that your nodes have four fields, data, left_child, right_child, and deleted. Deleted is a boolean field where true when the key is deleted, but still resides in the tree.
  3. (15 points) In this problem you will design a recursive AVL deletion procedure and execute it on a simple example.