Union-Find (Disjoint Set Union)

Problem Statement:

Visualize Union-Find operations on 7 elements (1–7).

We’ll perform a sequence of union operations, showing how sets merge.

Step 0: Each node is its own parent (7 disjoint sets).