DFS Connected Components Problems
58 DFS Connected Components 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 | Number of Islands | Easy | 1323 | 93 | BFS Shortest Path (Unweighted) · Union-Find |
| 2 | Number of Connected Components in an Undirected GraphPREMIUM | Easy | 1303 | 88 | Union-Find |
| 3 | Max Area of Island | Easy | 1280 | 85 | Matrix Traversal (Diagonal, Valid Sudoku, etc) |
| 4 | Number of Provinces | Easy | 1281 | 85 | Union-Find · BFS Shortest Path (Unweighted) |
| 5 | Pacific Atlantic Water Flow | Medium | 1573 | 85 | Multi-Source BFS · Matrix Traversal (Diagonal, Valid Sudoku, etc) |
MORE GRAPHS PATTERNS
// your mastery





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