InterviewSolution
Saved Bookmarks
| 1. |
What do you understand about the BFS (Breadth First Search) algorithm. |
|
Answer» BFS or Breadth-First Search is a graph traversal technique. It begins by traversing the graph from the ROOT node and explores all of the nodes in the immediate vicinity. It chooses the closest node and then visits all of the nodes that have yet to be visited. Until it reaches the objective node, the algorithm repeats the same METHOD for each of the closest nodes. The BFS Algorithm is given below:
|
|