Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/E869120/math-algorithm-book
/ dfs
Function
dfs
codes/python/Code_4_05_2.py:4–8 ·
view source on GitHub ↗
(pos, G, visited)
Source
from the content-addressed store, hash-verified
2
3
# 深さ優先探索を行う関数
4
def
dfs(pos, G, visited):
5
visited[pos] = True
6
for
i in G[pos]:
7
if
visited[i] == False:
8
dfs(i, G, visited)
9
10
# 再帰呼び出しの深さの上限を 120000 に設定
11
sys.setrecursionlimit(120000)
Callers
1
Code_4_05_2.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected