Given two nodes in a binary tree, find their first common ancestor (if it exists).
Anonymous
I just searched for each node as I went down the binary tree. As I went down to each level, I'd check if I could still reach both. If I couldn't then I return true for that node above.
Check out your Company Bowl for anonymous work chats.