Challenge: Least Common Ancestor
Let’s find the least common ancestor between two nodes in a BST.
Problem
In a BST, find the least common ancestor (LCA) between the two given nodes.
Input
Two node values. ...
Let’s find the least common ancestor between two nodes in a BST.
In a BST, find the least common ancestor (LCA) between the two given nodes.
Two node values. ...