Fundamentals
/
Union Find | Disjoint Set Union Data Structure Introduction
⏸
00:00
↻
← Prev
Next →
▶
Question
Implement a Union-Find (DSU) class with constructor(n), find(x), and union(x, y) returning true if a merge happened.
▶
Understand
▶
Approach
▶
My Code
▶
Reference Solution
Compare
11