Please help in debug why 2 test cases are failing

this is the code that i have written - https://ide.codingblocks.com/s/639497. Please help.

refer this https://www.geeksforgeeks.org/inorder-successor-in-binary-search-tree/

I have already seen this. I want to implement the same thing which bhaiya taught in video. And i did everything same. Please help me in debugging my code. I cant find any issue after many attempts.

Hi @LPLC0111
I checked ur code with the code that sir explained in the lecture… ur code seems fine only… there might be some compiler issues

But I can see in leaderboard, one of the students passed all test cases. I think there is something which I am doing wrong.

once try the soln above which i sent u… maybe it will pass all test cases…

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.