DiDi Labs interview question

a depth first search based coding question