I have one additional problem can someone tell me if I did this one right and I should be done...
The worst case number of comparisons in searching a bst is equal to its height - the number of levels in a tree. Write a recursive member function height() for class template BST to determine the height of the BST.
int BST::TREE_HEIGHT(TreeNode tn){
//Empty node is simple case
if (tn==NULL)
{
return 0;
}
else //Otherwise, use recursion
{
return 1 + max(TREE_HEIGHT(tn.leftChild), TREE_HEIGHT(tn.rightChild));
}
}