Wix interview question

Lowest Common Ancestor (LCA) problem.