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

Method find

src/class197/Code05_Boolean1.java:49–54  ·  view source on GitHub ↗
(int i)

Source from the content-addressed store, hash-verified

47 public static int[][] st = new int[MAXM + 1][MAXP];
48
49 public static int find(int i) {
50 while (i != fa[i]) {
51 i = fa[i];
52 }
53 return i;
54 }
55
56 public static void union(int x, int y) {
57 int fx = find(x);

Callers 2

unionMethod · 0.95
conflictMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected