Create tree using preorder and inorder

Replace line 29 with for(int j=s;j<=e;j++)

Code is Not working, giving runtime error

Please share your updated code.

It’s the same code and giving all 3 testcase wrong

@Saksham12 https://ide.codingblocks.com/s/178119
Check it again. I have made some changes. You were missing a space in the output format.

1 Like

Thanks for your support