hey no probs
i am sorry i did not get ur question?
the only structure u need is
struct node
{
int data;
struct node *lnode;
struct node *rnode;
};
typedef struct node *NODE;
if u r not clear dont hesitate 2 ask
As u know there r 2 paths in a BTree.
So u need lchild & rchild in ur structure.
initiall ur ur first node will b ur parent .
I have 4gotten the exact concept of how to traverse in a binary tree i.e where 2 go first (left or right) so u have to decide. i am assuming right.
now check...
you might have to use linked list.
declare a parent and a child.
initially the parent & child will pt to the 1st node.
now the implementation part:
check whether parent is null ( for no elements)
if not increment the child till child->next==NULL;
then copy the element which u want 2 insert i.e...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.