Linked Representation of Binary Tree :
Print this page
 

Binary trees can be represented by links where each node contains the address of the left child and the right child. If any node has its left or right child empty then it will have in its respective link field, a null value. A leaf node has null value in both of its links.

The structure defining a node of binary tree in C is as follows.

Struct node

{

struct node *lc ; /* points to the left child */

int data; /* data field */

struct node *rc; /* points to the right child */

}

Prev