Problem in the buildtree from inorder and preorder function

Can you please why the function build_treefrom_inorder_and_preorder in my code is not giving the output. please mark the change you have made.
Here is my code: https://ide.codingblocks.com/s/235829

@navin_japes
You haven’t taken n as input. Just write cin>>n; after line 303

Yah later on I found the mistake,
By the thanks for your response.

@navin_japes
Please mark this doubt as resolved :slight_smile:

Ok. I will mark it.,thanks bro.

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.