Lowest Common Ancestor of a Binary Tree III
CodingPhone, OnsiteSoftware EngineerReported Aug, 2026Medium Frequency
Company question banks are included with the Insider plan.
Given two nodes of a binary tree p and q, return their lowest common ancestor (LCA).
Each node has a reference to its parent, and you are not given the root. The lowest common ancestor of...