You are viewing a single comment's thread. Return to all comments →
while(r != NULL){ if(x < r->data && y < r->data) r = r->left; else if(x > r->data && y > r->data) r = r->right; else break; } return r; }
Seems like cookies are disabled on this browser, please enable them to open this website
Binary Search Tree : Lowest Common Ancestor
You are viewing a single comment's thread. Return to all comments →