Could you please help me in explaining logic for two . Prateek bhaiya had mentioned we have to serach in right and what is logic bhaiya had mentioned in left subtree of right tree part?
Hi Intelligent sis and brothers
@rssrivastavarohan
actually we are finding inorder successor (i.e node that come next to the root in inorder traversal) of the current root node.
and to find that we find the left most node in right subtree .
so first we will go to right subtree and then in right subtree we will go to left most node.
pls refer this ->https://www.geeksforgeeks.org/inorder-successor-in-binary-search-tree/
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.