Visa Inc. interview question

graph problem dfs and top sort