Groups
Category
A persistent DSU (Union-Find) keeps all historical versions so you can query connectivity at any past version and even branch new futures from old states.
Kruskalโs algorithm builds a minimum spanning tree (MST) by sorting all edges by weight and greedily picking the next lightest edge that does not form a cycle.