Pregunta de entrevista de Gem

Basic DFS/BFS tree question involving recursion