Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. def dfs(here):
  2.     global used, comp, graph
  3.     used[here] = True
  4.     for there in range(len(graph[here])):
  5.         if not used[there] and graph[here][there]:
  6.             comp.append([here, there])
  7.             dfs(there)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement