Concept Flow - Union Find Disjoint Set Data Structure
Initialize each element as its own set
Find operation: Find root of element
Union operation: Merge two sets
Update parent pointers
Repeat for queries
Sets merged
Start with each element alone. Find finds the root parent. Union merges sets by linking roots. Repeat to combine sets.