LeetCode 235: Lowest Common Ancestor Of A Binary Search Tree — Step-by-Step Visual Trace
Medium — Binary Search Tree | Tree | Recursion
The Problem
Find the lowest common ancestor (LCA) of two given nodes in a binary search tree, where the LCA is the deepest node that has both nodes as descendants.
Approach
Leverage the BST property to r...
blog.tracelit.dev1 min read