Given a binary search tree (BST), the task is to find the lowest common ancestor (LCA) of two given nodes in the BST. The LCA is the lowest node in the BST that has both nodes as descendants, where a node can be a descendant of itself.
Click Run to execute sample tests.