RECOVER BINARY SEARCH TREE

https://ide.codingblocks.com/s/437950,
please check my code, only sampe test case is passing,

bhaiya , code to chal gya , ab ye btao ki approach sahi hai ya kuch or efficient approach?

hello @CODER_JATIN

approach sahi hai.
iska thoda space optimise karo .
O(1) space me karne ka try karo

o(1) space mai bhaiya ,bina array lliye kese hoga?

4 pointer ki jarurat hai tumko bus. right?

worst case me inorder traversal me atmost 4 element milege jo condition violate kar rahe honge

ohkay , krta hu bhaiya . . .

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.