Create tree ( Using preorder and inorder)


plz check the code,test cases are not passing,

@akb.tech17 Hello Anshul,
your code is logically correct.
just you need to check formatting.
for example
for test case :
3
2
3
1
3
3
2
1
your code output
3 => 2 <=1
END => 3 <= END
END => 1 <= END
actual output
3 => 2 <= 1 (check extra space before 1)
END => 3 <= END
END => 1 <= END

@akb.tech17 check line no 56

@akb.tech17 Hey i think your doubt is resolved now ,please mark it resolved

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.

please give the code for this prob,as this ques have been doubt since long time

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.