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...

Markdown supported · ⌘↵ to post
No responses yet.