Depth-First Search pattern
Adjacency List
How to store a graph. Watch it run step by step, then write your own pseudocode and get it checked by AI.
- Concept
- 1 approach
Sign in with Google or GitHub and you land straight on this page. DSA comes with the all labs plan and every ChaiCode batch.
Depth-First Search
Concept lesson
The approach
- 01 Build & read an adjacency list O(V + E)O(V + E) space
What you will learn
- The idea behind Depth-First Search, drawn one step at a time
- Build & read an adjacency list: O(V + E) time, O(V + E) space
- The pseudocode for each approach, its line lit as the animation runs
More Depth-First Search
See Adjacency List run, step by step
Sign in and this page opens on the animation, with all 18 Depth-First Search problems beside it.
DSA comes with the all labs plan and every ChaiCode batch.