Flow Engineering interview question

Depth First Search Graph Question