breadth first search breadth first search (bfsalgorithm traverses graph in breadthward motion and uses queue to remember to get the next vertex to start searchwhen dead end occurs in any iteration as in the example given abovebfs algorithm traverses from to to to first then to and lastly to it employs the following rules rule visit the adjacent unvisited vertex mark it as visited display it insert it in queue rule if no adjacent vertex is foundremove the first vertex from the queue rule repeat rule and rule until the queue is empty step traversal description initialize the queue