Data Structures: Lab 6 - Binary Search Tree
Data Structures: Lab 6 - Binary Search Tree
template<class T>
TreeNode<T>::TreeNode(T v)
{
data=v;
left=NULL;
right=NULL;
}
template<class T>
Tree<T>::Tree()
{
size = 0;
root = NULL;
}
void main()
{
Tree<int> BST;
BST.insert(10);
BST.insert(5);
BST.insert(15);
BST.insert(25);
if(BST.find(7)== true)
cout<<"Found 7"<<endl;
if(BST.find(10)== true)
cout<<"Found 10"<<endl;
}