Leetcode binary tree form preorder and inorder

there is slight error in my code plz tell me where I am wrong
plz make a change in my code only and comment while doing corrections
problem


my solution code

Hello @coderajay03 i have answered you please see on that .

actually I wanted someone else’s call on this I tried to think what u said but didn’t helped me so I am seeking for help from someone else.

okay @coderajay03 you can raise the doubt again.

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.