what is l i did not understand what is l+1 or k-l-1.
At tiem stamp 5.36
@Aditya-Kushwaha-914550392281281
See l is the distance at which we find the node in our left subtree.
l+1 is for returning the distance to parent, because if for the current node it is l then for parent +1.
k-l-1 is the distance till which you will travel in right subtree of root to find the nodes which are at a distance from k.
I hope this clears your doubt.
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.