Professional Documents
Culture Documents
Asm 5 0
Asm 5 0
#include <iostream>
using namespace std;
class myNode
{
public:
int value;
myNode *leftChild;
myNode *rightChild;
};
return newNode;
}
// inserting nodes
myNode *insertNode(myNode *root, int key)
{
if (root == NULL)
{
return createNode(key);
}
if (key < root->value)
{
root->leftChild = insertNode(root->leftChild, key);
}
else if (key > root->value)
{
root->rightChild = insertNode(root->rightChild, key);
}
return root;
}
int main()
{
system("cls");
myNode *treeRoot = NULL;
int num, numValues;
return 0;
}