Construct a tree from inorder and postorder

why 15872 is being printed ??

hi Yuvraj,
u want to make tree from inorder and postorder or preorder and postorder???

Inorder and postorder

ok… there was just a small mistake in line 46…
u had written static int i = e+1;
but it should be static int i = e;
just change this and ur code will work perfectly…
corrected code --> https://ide.codingblocks.com/s/642146

hi Yuvraj,
i hope its clear now??

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.