Skip to main content

Graphs

DFS and BFS on adjacency lists for connectivity, cycles, and path problems.

9 problems 0 Easy 9 Medium 0 Hard

Problems (9)

Problem Link
Clone Graph
Pacific Atlantic Water Flow
Number of Connected Components in Undirected Graph
Surrounded Regions
Minimum Height Trees
Network Delay Time
Find Eventual Safe States
All Paths From Source to Target
Cheapest Flights Within K Stops

Related Guide

Graph Problems Cheat Sheet: BFS vs DFS vs Union-Find →

Not sure which graph algorithm to reach for? This cheat sheet maps problem types to the right tool i…

Enjoying this free content?

If this saved you time, buying me a coffee keeps new content coming.

Buy me a coffee
Buy me a coffee