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

Method addEdge

src/class161/Code06_Tourism1.java:50–54  ·  view source on GitHub ↗
(int u, int v)

Source from the content-addressed store, hash-verified

48 public static int[] addTag = new int[MAXN << 2];
49
50 public static void addEdge(int u, int v) {
51 next[++cntg] = head[u];
52 to[cntg] = v;
53 head[u] = cntg;
54 }
55
56 // 递归版,C++可以通过,java会爆栈
57 public static void dfs1(int u, int f) {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected