Question d’entretien chez Amazon

Question about maximum path sum in a tree.