MCPcopy Index your code
hub / github.com/algorithmzuo/algorithm-journey / dfs1

Method dfs1

src/class122/Code01_MaxFlow1.java:63–74  ·  view source on GitHub ↗
(int u, int f)

Source from the content-addressed store, hash-verified

61 }
62
63 public static void dfs1(int u, int f) {
64 deep[u] = deep[f] + 1;
65 stjump[u][0] = f;
66 for (int p = 1; p <= power; p++) {
67 stjump[u][p] = stjump[stjump[u][p - 1]][p - 1];
68 }
69 for (int e = head[u]; e != 0; e = next[e]) {
70 if (to[e] != f) {
71 dfs1(to[e], u);
72 }
73 }
74 }
75
76 public static int lca(int a, int b) {
77 if (deep[a] < deep[b]) {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected