DSA Key Problems

Lowest Common Ancestor of a Binary Tree

Given a binary tree and two nodes in it, return the lowest node that has both nodes in its subtree, allowing a node to be its own ancestor.