Fundamentals/Union Find | Disjoint Set Union Data Structure Introduction
← PrevNext →
Implement a Union-Find (DSU) class with constructor(n), find(x), and union(x, y) returning true if a merge happened.