Linkedin 电面

Find the lowest common ancestor of the 2 values in a binary tree. Follow up- return lca only if the 2 values exist in the tree.
Question based on Bayes Theorem (if it wil rain or not, something like that)