Pergunta de entrevista da empresa DoorDash

DFS Graph Question Question similar to 2 Sum