Pergunta de entrevista da empresa Amazon

find the common ancestor of two nodes using the interface.