Explore Library
FlashcardAdvanced

Depth-First Search (DFS)

DFS dives deep along one branch using a stack, saving memory but risking loops.

Question

How does Depth-First Search work and what are its trade-offs?

Click to reveal answer