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

Method find

src/class174/Code05_Lcm1.java:76–81  ·  view source on GitHub ↗
(int x)

Source from the content-addressed store, hash-verified

74 }
75
76 public static int find(int x) {
77 while (x != fa[x]) {
78 x = fa[x];
79 }
80 return x;
81 }
82
83 public static void union(int x, int y, int a, int b) {
84 int fx = find(x);

Callers 2

unionMethod · 0.95
checkMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected