Disjoint Set (Level- 1)
Union operation
void union(int i, int j)
{
int irep = find(i); // representative (root) of i
int jrep = find(j); // representative (root) of j
// Attach i’s root under j’s root
Parent[irep] = jrep;
}
Find Operation
int fin...
farazalam2017.hashnode.dev2 min read