Lowest Common Ancestor

Category: Trees & BSTs

Difficulty: intermediate

Description: Find LCA of two nodes in tree

Time Complexity: O(n)

Space Complexity: O(h)

Related LeetCode Problems