(u, visited, graph)
| 27 | |
| 28 | |
| 29 | def depth_first_search(u, visited, graph): |
| 30 | visited[u] = 1 |
| 31 | for v in graph[u]: |
| 32 | if not visited[v]: |
| 33 | depth_first_search(v, visited, graph) |
| 34 | |
| 35 | stack.append(u) |
| 36 | |
| 37 | |
| 38 | def topological_sort(graph, visited): |
no test coverage detected