Recover binary search tree

what is the problem in this code

@royprincejmp
Your logic wont work on this problem
Dry run your approach once and you will see why it fails

what should be the logic??

@royprincejmp
Please follow this discussion Recover binary search tree