Representation of Binary Tree :
Print this page
 
         

The structure of each node of a binary tree contains one data field and two pointers, each for the right & left child. Each child being a node has also the same structure.

The structure of a node is shown below.

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 */
}

There are two ways for representation of binary tree.

 
Prev