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

Method solve

src/class184/Code05_Freezing1.java:186–195  ·  view source on GitHub ↗
(int u)

Source from the content-addressed store, hash-verified

184 }
185
186 public static void solve(int u) {
187 vis[u] = true;
188 calc(u);
189 for (int e = head[u]; e > 0; e = nxt[e]) {
190 int v = to[e];
191 if (!vis[v]) {
192 solve(getCentroid(v, u));
193 }
194 }
195 }
196
197 public static void main(String[] args) throws Exception {
198 FastReader in = new FastReader(System.in);

Callers 1

mainMethod · 0.95

Calls 2

calcMethod · 0.95
getCentroidMethod · 0.95

Tested by

no test coverage detected