codeLink :https://ide.codingblocks.com/s/183216
my code is not giving any output please correct it
Create tree using inorder and preorder
there is a small error in your code
- at line 19 instead of if(s<e) it should be if( s > e) that’s why your code is not printing anything
- at line 22 instead of node *root = new node(pre[0]); it should be node *root = new node(pre[i]);
i have corrected your code : https://ide.codingblocks.com/s/183221
feel free to ask in case of any doubt 
mark the doubt as resolved if you got the answer
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.