MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / DSU

Method DSU

CPP/Kruskal's_Algorithm.cpp:12–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11public:
12 DSU(int n)
13 {
14 parent = new int[n];
15 rank = new int[n];
16
17 for (int i = 0; i < n; i++) {
18 parent[i] = -1;
19 rank[i] = 1;
20 }
21 }
22
23 // Find function
24 int find(int i)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected