Loading repovive.com/problems/classics/21
Implement a Union-Find (Disjoint Set Union) data structure that supports the following operations on elements (numbered 1 to ):
UNION u v: Merge the sets containing elements and FIND u v: Check if elements and are in the same setInitially, each element is in its own set.