Pergunta de entrevista da empresa Microsoft

Logic to find the LCA of tree and node has pointer to parent node.

Resposta da entrevista

Sigiloso

12 de jul. de 2016

you can find the LCA of 2 nodes by using DFS algo. it gives the path for both the nodes. traverse them and find the common node.