Amazon interview question

Find common ancestor LC problem