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

Method link

src/class201/Code07_Network1.java:157–162  ·  view source on GitHub ↗
(int x, int y)

Source from the content-addressed store, hash-verified

155 }
156
157 public static void link(int x, int y) {
158 makeroot(x);
159 if (findroot(y) != x) {
160 fa[x] = y;
161 }
162 }
163
164 public static void cut(int x, int y) {
165 makeroot(x);

Callers 1

connectMethod · 0.95

Calls 2

makerootMethod · 0.95
findrootMethod · 0.95

Tested by

no test coverage detected