1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
binarySearchTree::binarySearchTree() :root(NULL)
{
}
void binarySearchTree::treeInsert(treeNode *&root, string newItem, string oldItem, string ollItem, string neeItem, string hapItem)
{
if(root == NULL)
{
root = new treeNode(newItem), (oldItem), (ollItem), (neeItem), (hapItem);
return;
}
else if (newItem, oldItem, ollItem, neeItem, hapItem < root->data)
{
treeInsert(root->left, newItem, oldItem, ollItem, neeItem, hapItem);
}
else
{
|