Pergunta de entrevista da empresa YouTube

Given a tree, find and return the deepest node, along with it's depth. If multiple such nodes exist, return the right-most one.

Resposta da entrevista

Sigiloso

21 de set. de 2018

dfs in order traversal with keeping track of the depth. If you reach a leaf, compare to the current max depth node and replace if necessary.