BFS can be used to find the shortest distance between a starting node and the remaining nodes of the graph.

Give a start node s, a general algorithm for the BFS approach as follows:

Last modified: 27/July/98 (12:14)