PrevNext

You're not signed in!

Sign in to save your progress and sync your settings across devices.

Very Frequent
 0/13

Depth First Search (DFS)

Author: Siyong Huang

Recursively traversing a graph.

DFS in Undirected Graphs

Resources
CSAup to but not including "More about DFS"
CPHexample diagram + code

A connected component is a maximal set of connected nodes in an undirected graph. In other words, two nodes are in the same connected component if and only if they can reach each other via edges in the graph.

Focus Problem – read through this problem before continuing!

For example, the goal of this problem above is to add edges such that the entire graph is a single connected component.

Solution - Building Roads

Solution

Problems

StatusSourceProblem NameDifficultyTagsSolution
SilverEasy
Show Tags

DFS

External Sol
SilverEasy
Show Tags

DFS

SilverEasy
Show Tags

DFS

External Sol
SilverEasy
Show Tags

Tree, DFS

KattisEasy
Show Tags

DFS

SilverNormal
Show Tags

Sorting

External Sol
GoldNormal
Show Tags

DFS, Binary Search

SilverNormal
Show Tags

DFS, Binary Search

KattisVery Hard
Show Tags

DFS, Binary Search

DFS in Directed Graphs

StatusSourceProblem NameDifficultyTagsSolution
CSESEasy
CCONormal
SilverHardExternal Sol

Module Progress:

Give Us Feedback on Depth First Search (DFS)!

PrevNext