Union-Find Problems
44 Union-Find problems on LeetCode, a Graphs interview pattern, ranked by importance (how often it comes up in real interviews). Difficulty (ELO) and importance shown per problem.
| # | PROBLEM | DIFF | ELO | IMP | PATTERNS |
|---|---|---|---|---|---|
| 1 | Graph Valid TreePREMIUM | Easy | 1398 | 87 | DFS Connected Components · BFS Shortest Path (Unweighted) |
| 2 | Accounts Merge | Medium | 1638 | 83 | DFS Connected Components · Frequency Counting / Hash Map Lookup |
| 3 | Redundant Connection | Medium | 1420 | 82 | DFS Connected Components |
| 4 | Smallest String With Swaps | Hard | 1855 | 82 | Sorting + Comparison · DFS Connected Components |
| 5 | Number of Islands IIPREMIUM | Hard | 1842 | 78 | Frequency Counting / Hash Map Lookup |
MORE GRAPHS PATTERNS
// your mastery





What's your Union-Find tier?
leaps.gg syncs your LeetCode history, scores your Union-Find mastery, and recommends exactly which problems to do next with spaced repetition. Free to start.
GET MY MASTERY MAP →