🚀 Phases 1–5 are live — Days 1–17 cover the foundations and the algorithmic patterns. See the roadmap →
Day 9 - Graphs (Basics)Practice QuestionsOverview

Graph Practice Questions

Six warm-up problems that exercise the representation — building a graph, counting edges, identifying components, modeling problems — without any heavyweight traversal yet. The traversal-heavy classics (Number of Islands, Course Schedule, Clone Graph, etc.) are on Day 10.

Think of today as boot camp for the graph model. By the end you should feel comfortable taking an edge list, picking the right representation, and answering basic structural questions in O(V + E).

Easy

ProblemPatternStatus
Find Center of Star GraphDegree countingAvailable
Find the Town JudgeIn/out degree countingAvailable
Find if Path Exists in a GraphDFS / BFS / Union-FindAvailable

Medium

ProblemPatternStatus
Number of Connected Components in an Undirected GraphDFS sweep / Union-FindAvailable
Keys and RoomsReachability via DFS/BFSAvailable
Min Vertices to Reach All Nodes in a DAGIn-degree countingAvailable

More Practice (Coming Soon — Day 10)

These problems use BFS / DFS heavily — you’ll meet them on Day 10 once we’ve covered the traversal algorithms properly.

ProblemPatternStatus
Number of IslandsDFS / BFS over a gridAvailable on Day 10
Clone GraphDFS with hash-map memoAvailable on Day 10
Course ScheduleCycle detection in directed graphAvailable on Day 10
Word LadderBFS on word transformationsAvailable on Day 10
Max Area of IslandDFS area accumulationAvailable on Day 10
Rotting OrangesMulti-source BFSAvailable on Day 4