Graphs
Graph representation
- Adjacency list
- Adjacency matrix
- Edge list
Traversal
- BFS: queue
- DFS: stack or recursion
Problems to practice
- Number of islands
- Flood fill
- Course schedule
- Clone graph
- Topological sort
- Detect cycle in directed graph
- Shortest path (BFS for unweighted, Dijkstra for weighted)
- Union-Find / Disjoint Set
Graph patterns
- BFS for shortest distance in unweighted graphs
- DFS for connected components
- Topological sort for dependency problems
- Union-find for connectivity and grouping
Can you explain it without the notes?
Graphs
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Graph representation
Turn this concept into a clear answer.
Practice this conceptAdapted from 14_DSA_MASTER.md · “10. Graphs”. Examples are study fragments; framework behavior can depend on your version.