Flashcard
Tree & Graph Traversals: BFS vs DFS
Understand how BFS and DFS explore trees and graphs using queues and stacks respectively.
Question
How do BFS and DFS explore nodes, and what data structures drive each?
Click to reveal answer
Understand how BFS and DFS explore trees and graphs using queues and stacks respectively.
How do BFS and DFS explore nodes, and what data structures drive each?