which display function we need to use
How to print the tree?
You can use the following approach for your display function… as :
if(root==NULL)
return;
if(root->left!=NULL && root->right!=NULL)
{
}
if(root->left!=NULL && root->right==NULL)
{
}
if(root->left==NULL && root->right!=NULL)
{
}
print(root->left);
print(root->right);
}
You need to dry run the order these statements are following up by building the tree and then considering in which order they are being printed…