MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / dfs2

Function dfs2

graphs/scc_kosaraju.py:14–21  ·  view source on GitHub ↗
(u)

Source from the content-addressed store, hash-verified

12
13
14def dfs2(u):
15 global graph, reversed_graph, scc, component, visit, stack
16 if visit[u]:
17 return
18 visit[u] = True
19 component.append(u)
20 for v in reversed_graph[u]:
21 dfs2(v)
22
23
24def kosaraju():

Callers 1

kosarajuFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected