CSC 269 Programming Project.
Due Monday July 29, 2002.
-
Implement the search structure "Binary Search Tree."
-
Write all your own code.
Do not use "off the shelf" code from any source.
However, you may look at available code to get ideas.
Be sure not to just copy it, however.
-
The items stored will be character strings of length 3, e.g., "Bob".
Input will be read from a text file or the keyboard.
-
Your program will read the file and insert items in th order they are
read. No duplicate item will be inserted.
-
Your program will be able to execute the usual operators for binary
search trees.
Lazy deletion is allowed.
-
Write procedures which count the number of nodes in the tree and which
compute the height of the tree.
-
Run appropriate tests for all your procedureas.
-
Email your source program to Chin Liu by midnight, Monday, July 29.
-
I don't want anyone's program to resemble anyone else's program. Try to
be unique.
-
Test File 1.
Deletion File 1.
Second Insertion File 1. (To test for re-insertion of
an item that has been deleted)
Sample run using Test File 1, Deletion File 1,
and Second Insertion File 1.
Test file 2.
Test file 3.
Test file 4. (This is a "worst case" file.)
Using
guide items to cause Test file 4
to be stored efficiently. Here is the run.
