Lowest Common Ancestor of a Binary Tree at Meta
Medium68.7% acceptance
This problem has 87.5% frequency at Meta.
Problem Description
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the [definition of LCA on Wikipedia](<https://en.wikipedia.org/wiki/Lowest_common_ancestor>): “The lowest common ancestor is defined between two nodes `p` and `q` as the lowest node in `T` that h...
Read full problem and hintsTopics
Also asked at 22 companies
More Meta Questions
Binary Tree Right Side ViewMediumDiameter of Binary TreeEasySum Root to Leaf NumbersMediumClone GraphMediumMaking A Large IslandHard
View all Meta questions