Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def dfs(here):
- global used, comp, graph
- used[here] = True
- for there in range(len(graph[here])):
- if not used[there] and graph[here][there]:
- comp.append([here, there])
- dfs(there)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement