Graph Theory37 sections · 1633 units
Open in Course

Intro

Theory vs Practice

Knowing how a hammer works is different from building a table. Similarly, knowing DFS code is different from solving a problem like "Count the Islands." In this section, you will look at three classic patterns that appear constantly in interviews and competitions: flood fill for coloring regions, connected components on grids, and cycle detection for dependencies.

Each pattern builds on DFS traversal but solves a distinct class of problems. I'll show you how to recognize which pattern fits which problem.

photo_۲۰۲۵-۱۲-۲۶_۰۱-۲۹-۴۵.jpg