grokking-algorithms/chapter7
2024-01-12 12:32:53 +00:00
..
bfs_dirtrav.py reword 2024-01-12 12:32:53 +00:00
dfs_dirtrav.py reword 2024-01-12 12:32:53 +00:00
README.md upd bfs, dfs on rooted tree 2024-01-12 12:19:51 +00:00

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.