MCPcopy Create free account
hub / github.com/algorithmzuo/algorithm-journey / addEdge

Method addEdge

src/class195/Code03_Road1.java:47–52  ·  view source on GitHub ↗
(int u, int v, int w)

Source from the content-addressed store, hash-verified

45 public static PriorityQueue<int[]> heap = new PriorityQueue<>((a, b) -> a[2] - b[2]);
46
47 public static void addEdge(int u, int v, int w) {
48 nxt[++cntg] = head[u];
49 to[cntg] = v;
50 weight[cntg] = w;
51 head[u] = cntg;
52 }
53
54 public static int buildOut(int l, int r) {
55 int rt;

Callers 5

buildOutMethod · 0.95
buildInMethod · 0.95
xToRangeMethod · 0.95
rangeToXMethod · 0.95
rangeToRangeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected