Introduction
Imagine you have many groups of friends, and you want to quickly find out if two people are in the same group or not. Managing these groups efficiently is tricky when they keep merging. Disjoint set, also called Union-Find, solves this problem by keeping track of which elements belong together and allowing fast merging and checking.
