Pls revert as soon as possible


i am not able to get the concept of how to update the target
Pls make suitable changes

https://ide.codingblocks.com/s/225690 i am not able to get the concept of how to update the target Pls make suitable changes

hi @Madhavendra-Gupta-2240591552663161, your logic is correct but there are some mistakes

  1. after traversing for left subtree if element is not found ie. if dl==-1 then u have to also traverse for right subtree .
  2. your output should be in sorted manner and u have to print 0 if element is not found
  3. u are taking input incorrectly.

here , i have corrected your code :

In case of any doubt feel free to ask :slight_smile:
mark your doubt as resolved if u got the answer
hit :heart: if you liked the answer

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.