Getting Wrong Output

Despite my code get compiled and im getting the correct output. im unable to pass all the test cases.

you have to print the preorder, not the inorder.
i see that you have solved this already .great job! if this solves your doubt please mark it as resolved :slight_smile: