Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithmzuo/algorithm-journey
/ addEdge
Method
addEdge
src/class143/Code01_Elevator.java:64–69 ·
view source on GitHub ↗
(int u, int v, long w)
Source
from the content-addressed store, hash-verified
62
}
63
64
public
static
void
addEdge(
int
u,
int
v, long w) {
65
next[cnt] = head[u];
66
to[cnt] = v;
67
weight[cnt] = w;
68
head[u] = cnt++;
69
}
70
71
// 来自讲解064,dijkstra算法
72
public
static
void
dijkstra() {
Callers
1
main
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected