Pergunta de entrevista da empresa Amazon

Question about maximum path sum in a tree.