Create Tree using Preorder and inorder

Anshul, pls all these conditions in your print function as,
if(root->left!=NULL && root->right==NULL)
{
cout<left->data<<" => “<data<<” <= “<<“END”<<endl;
}
if(root->left ==NULL && root->right==NULL)
{
cout<<“END”<<” => “<data<<” <= “<<“END”<<endl;
}
if(root->left==NULL && root->right!=NULL)
{
cout<<“END”<<” => “<<” “<data<<” <= “<right->data<<endl;
}
if(root->left!=NULL && root->right!=NULL)
{
cout<left->data<<” => “<<” “<data<<” <= "<right->data<<endl;
}
print(root->left);
print(root->right);

what??? i didn’t get you,

what??? i didn’t get you,!!!

I have added the conditions you need to include in the print function of your code…so as to pass all test cases… pls use those conditions…