Explain BFS and DFS in terms of backtracking
- by HH
Wikipedia about DFS
Depth-first search (DFS) is an
algorithm for traversing or searching
a tree, tree structure, or graph. One
starts at the root (selecting some
node as the root in the graph case)
and explores as far as possible along
each branch before backtracking.
So is BFS?
"an algorithm that choose a starting
node,…