CS1500 Algorithms and Data Structures for Engineering, FALL 2012

 LAB 8: Binary Search Tree

Start by downloading the code demoed in class and rename it LAB8_FIRSTNAME_LASTNAME.cpp. You can use either class or struct.
This code is the base for your lab assignment; add to it the following functions:

Search for a certain value (return the address of the treeobject found, or NULL)
treenode* Search (treenode* root, int x)

Find the minimum and maximum in the tree
int Min (treenode* root)
int Max (treenode* root)

Given value x, find the value immediately higher/lower than x in the tree (return the address of the treeobject found, or NULL)
treenode* Successor (treenode* root, int x)
treenode* Predecessor (treenode* root, int x)


Delete the node that has value x
void delete_node (treenode* root,  int x)