Category: union_find
-
Union-Find
Say we have an equivalence relation on a set . So, partitions into equivalence classes which are disjoint subsets of . Now, given a pair where , we want to answer: Do and belong to the same equivalence class? As an example, we need to answer this question to build the minimum spanning tree of…