I need help!!
There is a question where I have to create a program to perform Inorder on the following data:
60, 40, 80, 22, 55, 99
I think I got the right coding for Inorder. But I have problem in inserting the data. I got the InsertTree function from a book.But the function has 3 parameters. Do I need key in this function?
Urgent help needed. Thanks.
struct TreeNode *Left, *Right;
typedef struct TreeNode TreePointer;
void InsertTree(TreePointer Root,Datarecord rec,int key);
void Inorder(TreePointer Root);
void Inorder(TreePointer Root)
printf("%d ", Root->Data);
void InsertTree(TreePointer Root,Datarecord rec,int key)
if (Root == NULL)
Root = (TreePointer)malloc(sizeof(TreeNode));
Root->Key = Key;
Root->Data = rec;
Root->Left = NULL;
Root->Right = NULL;
if (Key < Root->Key)