Skip to content

Interview Questions

Categorized by difficulty with key concepts. Practice in order: Easy → Medium → Hard.


#ProblemKey ConceptPlatform
1Find if Path Exists in GraphBasic BFS/DFSLeetCode 1971
2Flood FillDFS on gridLeetCode 733
3Number of IslandsDFS/BFS componentsLeetCode 200
4Find Center of Star GraphDegree countingLeetCode 1791
5Find the Town JudgeIn/Out degreeLeetCode 997
6Clone GraphBFS + HashMapLeetCode 133

#ProblemKey ConceptPlatform
1Course ScheduleCycle detection (Topo Sort)LeetCode 207
2Course Schedule IITopological Sort (Kahn’s)LeetCode 210
3Number of Connected ComponentsUnion-Find / DFSLeetCode 323
4Pacific Atlantic Water FlowMulti-source DFS/BFSLeetCode 417
5Rotting OrangesMulti-source BFSLeetCode 994
6Word LadderBFS shortest pathLeetCode 127
7Network Delay TimeDijkstraLeetCode 743
8Is Graph Bipartite?2-coloring BFS/DFSLeetCode 785
9Surrounded RegionsDFS from boundaryLeetCode 130
10Max Area of IslandDFS component sizeLeetCode 695
1101 MatrixMulti-source BFSLeetCode 542
12Accounts MergeUnion-FindLeetCode 721
13Minimum Height TreesTopological leaf trimmingLeetCode 310
14Graph Valid TreeCycle detection + connectivityLeetCode 261

#ProblemKey ConceptPlatform
1Word Ladder IIBFS + DFS backtrackLeetCode 126
2Alien DictionaryTopological SortLeetCode 269
3Critical Connections in NetworkBridges (Tarjan’s algo)LeetCode 1192
4Cheapest Flights Within K StopsModified Dijkstra/Bellman-FordLeetCode 787
5Swim in Rising WaterBinary search + BFS or DijkstraLeetCode 778
6Bus RoutesBFS on layered graphLeetCode 815
7Shortest Path to Get All KeysBFS with bitmask stateLeetCode 864
8Reconstruct ItineraryHierholzer’s (Eulerian path)LeetCode 332
9Strongly Connected ComponentsKosaraju’s / Tarjan’sClassic CS problem

LevelGoalSuggested ProblemsTarget Time
🟢 EasyBuild fundamentals, understand graph traversalAll 62-3 days
🟡 MediumMaster core patterns, apply to grid + graphFirst 75-7 days
🟡 Medium+Advanced patterns (Union-Find, Dijkstra)All 147-10 days
🔴 HardMulti-algorithm, state-based problemsFirst 5Extra practice

💡 Tip: Focus on the Medium problems — they cover 90% of interview graph questions. Hard problems are more common at top-tier companies.


Before attempting the problems, review Tips & Common Mistakes to avoid pitfalls.