Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ dfs
Function
dfs
graphs/scc_kosaraju.py:4–11 ·
view source on GitHub ↗
(u)
Source
from the content-addressed store, hash-verified
2
3
4
def
dfs(u):
5
global graph, reversed_graph, scc, component, visit, stack
6
if
visit[u]:
7
return
8
visit[u] = True
9
for
v in graph[u]:
10
dfs(v)
11
stack.append(u)
12
13
14
def
dfs2(u):
Callers
1
kosaraju
Function · 0.70
Calls
1
append
Method · 0.45
Tested by
no test coverage detected