Graphs
Practice this questionWANT TO UNDERSTAND THE CONCEPT FIRST?Learn 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
Adapted from 14_DSA_MASTER.md · “10. Graphs”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.