Skip to content

Files

Latest commit

54fb14b · Jun 5, 2025

History

History
133 lines (115 loc) · 7.71 KB

graph-problems.md

File metadata and controls

133 lines (115 loc) · 7.71 KB

Traversal

Grid

Problem Difficulty
733. Flood Fill Easy
463. Island Perimeter Easy
417. Pacific Atlantic Water Flow Medium
@@1905. Count Sub Islands Medium
79. Word Search Medium
1559. Detect Cycles in 2D Grid Medium (1837)

General

Problem Difficulty
841. Keys and Rooms Medium (1412)
1306. Jump Game III Medium (1396)
@@133. Clone Graph Medium
399. Evaluate Division Medium
@@2192. All Ancestors of a Node in a Directed Acyclic Graph Medium (1787)
2101. Detonate the Maximum Bombs Medium (1880)
721. Accounts Merge Medium
2092. Find All People With Secret Medium (2003)

Tree-like

Problem Difficulty
1443. Minimum Time to Collect All Apples in a Tree Medium (1682)
1530. Number of Good Leaf Nodes Pairs Medium (1745)
1519. Number of Nodes in the Sub-Tree With the Same Label Medium (1809)

Connected Components

Problem Difficulty
200. Number of Islands Medium
130. Surrounded Regions Medium
1254. Number of Closed Islands Medium (1659)
2316. Count Unreachable Pairs of Nodes in an Undirected Graph Medium (1604)
1319. Number of Operations to Make Network Connected Medium (1633)

Area

Problem Difficulty
695. Max Area of Island Medium
@@827. Making A Large Island Hard (1934)

Path

Problem Difficulty
1971. Find if Path Exists in Graph Easy
797. All Paths From Source to Target Medium (1383)

Bipartite

Problem Difficulty
785. Is Graph Bipartite? Medium
886. Possible Bipartition Medium
1042. Flower Planting With No Adjacent Medium (1712)

Topological Sort

Problem Difficulty
@@207. Course Schedule Medium
210. Course Schedule II Medium
@@2115. Find All Possible Recipes from Given Supplies Medium (1679)
@@2192. All Ancestors of a Node in a Directed Acyclic Graph Medium (1787)
310. Minimum Height Trees Medium

BFS

Single-source BFS

Problem Difficulty
@@127. Word Ladder Hard
1091. Shortest Path in Binary Matrix Medium
433. Minimum Genetic Mutation Medium
1926. Nearest Exit from Entrance in Maze Medium (1638)
1129. Shortest Path with Alternating Colors Medium (1779)
@@934. Shortest Bridge Medium (1825)
752. Open the Lock Medium (1877)
@@1293. Shortest Path in a Grid with Obstacles Elimination Hard (1967)
3568. Minimum Moves to Clean the Classroom Hard
3552. Grid Teleportation Traversal Medium

Multi-source BFS

Problem Difficulty
@@994. Rotting Oranges Medium
542. 01 Matrix Medium
1162. As Far from Land as Possible Medium (1666)

To Classify

Problem Difficulty
684. Redundant Connection Medium
980. Unique Paths III Hard

Union Find

Problem Difficulty

TODO: 七、并查集

Explanation

TODO: Add explanation videos