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

Method addEdge2

src/class195/Code09_Jail1.java:84–89  ·  view source on GitHub ↗
(int u, int v)

Source from the content-addressed store, hash-verified

82 }
83
84 public static void addEdge2(int u, int v) {
85 indegree[v]++;
86 next2[++cnt2] = head2[u];
87 to2[cnt2] = v;
88 head2[u] = cnt2;
89 }
90
91 // 递归版
92 public static void build1(int u, int fa) {

Callers 4

build1Method · 0.95
build2Method · 0.95
pathSetMethod · 0.95
linkMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected