Sunday common C++ interview problem: Lowest common ancestor.
Given a binary tree and two (not necessarily different) nodes, return the node which is the lowest common ancestor to the two given nodes: https://en.wikipedia.org/wiki/Lowest_common_ancestor
Solve it yourself: https://compiler-explorer.com/z/b6cbrqdc7
Solution: https://compiler-explorer.com/z/9PbdacoM5