Explain BFS and DFS in terms of backtracking
Wikipedia about Depth First Search: 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 what is Breadth First Search? "an algorithm that choose a starting node, checks all nodes backtracks , chooses the shortest path, chose neighbour nodes backtracks , chose the shortest path, finally finds the optimal path because of traversing each path due to continuous backtracking. Regex find 's pruning --