Pregunta de entrevista de Epic

Algorithmic questions mostly with DFS and BFS