Pergunta de entrevista da empresa Meta

u have 2 nodes in a binary tree get the first upper common node in an optimal way