Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
14
def
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
24
def
kosaraju():
Callers
1
kosaraju
Function · 0.85
Calls
1
append
Method · 0.45
Tested by
no test coverage detected