mirror of
https://github.com/onyx-and-iris/grokking-algorithms.git
synced 2024-11-16 01:40:53 +00:00
6 lines
363 B
Markdown
6 lines
363 B
Markdown
# DFS BFS on rooted tree
|
|
|
|
The BFS example uses a queue which results in a breadth first search. When a directory is found its contents are appended to the queue to be processed later
|
|
|
|
The DFS example uses the call stack which results in a depth first search. When a directory is found it is recursively passed to files_with_extension to be processed immediately.
|