Fetching data...
This may take a moment
Back
1780. Lowest Common Ancestor of a Binary Tree II
Medium
Tree
Depth-First Search
Binary Tree
Binary Lifting
Lowest Common Ancestor
Solve on LeetCode
View Solutions
Description
Hints
Hint 1
Traverse the graph visiting root, left, root, right, root to make an Euler Path
Hint 2
Return the node (LCA) that is at the lowest depth between p and q in the Euler Path
Similar Questions
Lowest Common Ancestor of a Binary Search Tree
Medium
Lowest Common Ancestor of a Binary Tree
Medium
Lowest Common Ancestor of a Binary Tree III
Medium
Lowest Common Ancestor of a Binary Tree IV
Medium
Statistics
Acceptance
69.8%
Submissions
176,063
Accepted
122,813