Lowest Common Ancestor pattern
A recursive call returns a target when found. A node receiving useful answers from both children becomes the common ancestor.
Difficulty: Medium · Approach: Visible node journey
This is a public lesson preview. Sign in with a Lifetime Pass to open the protected animation, solution, and code.