Question d’entretien chez DoorDash

DFS Graph Question Question similar to 2 Sum