Pregunta de entrevista de HighRadius

Simple DFS based traversal question