MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / find

Method find

Programs/Kruskal.java:31–35  ·  view source on GitHub ↗
(subset subsets[], int i)

Source from the content-addressed store, hash-verified

29 }
30
31 int find(subset subsets[], int i) {
32 if (subsets[i].parent != i)
33 subsets[i].parent = find(subsets, subsets[i].parent);
34 return subsets[i].parent;
35 }
36
37 void Union(subset subsets[], int x, int y) {
38 int xroot = find(subsets, x);

Callers 2

UnionMethod · 0.95
KruskalAlgoMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected