LESSON 10 / 75·2 min readIntermediate

Graphs

Must knowConcept lesson
01 Understand02 Recall03 Prepare

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

PAUSE & RECALL

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

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: Dynamic programming

Adapted from 14_DSA_MASTER.md · “10. Graphs”. Examples are study fragments; framework behavior can depend on your version.