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

Method dfs2

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

Source from the content-addressed store, hash-verified

97 }
98
99 public static void dfs2(int u, int f) {
100 for (int e = head[u], v; e != 0; e = next[e]) {
101 v = to[e];
102 if (v != f) {
103 dfs2(v, u);
104 }
105 }
106 for (int e = head[u], v; e != 0; e = next[e]) {
107 v = to[e];
108 if (v != f) {
109 num[u] += num[v];
110 }
111 }
112 }
113
114 public static void main(String[] args) throws IOException {
115 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected