Pregunta de entrevista de Multiplier

A simple tree problem which can be solve using BFS, DFS