I am not able to code for the input section .please give some hints and explanation for taking input.
Tree_Bottom_View
hey @rajukumarbhui, here is the logic for taking input
node* bulidPreTree()
{
int d;
cin>>d;
if(d==-1)
{
return NULL;
}
node* root=new node(d);
root->left=bulidPreTree();
root->right=bulidPreTree();
return root;
}
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.