Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithmzuo/algorithm-journey
/ addEdge
Method
addEdge
src/class185/Code07_HideSeek1.java:115–119 ·
view source on GitHub ↗
(int u, int v)
Source
from the content-addressed store, hash-verified
113
}
114
115
public
static
void
addEdge(
int
u,
int
v) {
116
nxt[++cntg] = head[u];
117
to[cntg] = v;
118
head[u] = cntg;
119
}
120
121
// 重链剖分收集信息递归版,java会爆栈,C++不会
122
public
static
void
dfs1(
int
u,
int
f) {
Callers
1
main
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected