Recover Binary search tree


sir/mam,
please my code is not working ,help me to find out the error

@Korou
your isbst() because it is never going to tree->right if ans is not found in left subtree. So change “&&” is line 73 to “||”.
Also ans should be printed in sorted order so move line 70 above 69

@Korou
I think you got 100 points. Please mark this doubt as resolved. Thanks :slight_smile:

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.