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

Method dfs2

src/class194/Code07_Policija1.java:126–138  ·  view source on GitHub ↗
(int u, int t)

Source from the content-addressed store, hash-verified

124 }
125
126 public static void dfs2(int u, int t) {
127 top[u] = t;
128 if (son[u] == 0) {
129 return;
130 }
131 dfs2(son[u], t);
132 for (int e = head2[u], v; e > 0; e = next2[e]) {
133 v = to2[e];
134 if (v != fa[u] && v != son[u]) {
135 dfs2(v, v);
136 }
137 }
138 }
139
140 public static boolean mustPass(int a, int b, int c) {
141 while (top[a] != top[b]) {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected