Pregunta de entrevista de DoorDash

Some variations Of DFS algorithm