Creating tree from preorder and inorder


I have asked this doubt yesterday and havent received an anser yet?Why is this code not running and what is wrong in it?Plz respond so that i can resolve the issue and move ahead with the course

Hello @aryamaan1011
make these changes in ur code
image

size of operator will always give u 10000 because u have declared array of 10000 size.
thats why i commented that out.
we already have size of array in N. so using that we can write e as N-1.

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.