What is wrong with my code?

giivng wa for inorder successsor in bst 1
link to code-> https://ide.codingblocks.com/s/646034

please help with this code @aman212yadav

@ikshuldureja130 it works correctly fine because for input u just take preorder of binary tree but in ouptut u have to return inorder successor of that so its al right

@ikshuldureja130 just understand your code properly first if not understand yet then tell me i will try to explain you

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.

But on submitting, it is passing only 1 test case

hi @ikshuldureja130
can u share the link of ques…

https://online.codingblocks.com/app/player/219508/content/215074/8472/code-challenge

Question is inorder successor in BST

link u sent is not opening… ur code seems correct, kindly ask this doubt under that ques only, as else i am unable to check which test case ur code is failing on… currently u have asked doubt under the video lecture…

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.