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

Method find

src/class195/Code08_Forest1.java:82–87  ·  view source on GitHub ↗
(int i)

Source from the content-addressed store, hash-verified

80 }
81
82 public static int find(int i) {
83 if (i != father[i]) {
84 father[i] = find(father[i]);
85 }
86 return father[i];
87 }
88
89 public static void build(int u, int fa) {
90 dep[u] = dep[fa] + 1;

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected