Algorithm - Graph

Graph(unweighted)

 BFS:

  1. First, the shortest path tree is only useful if BFS war performed with x as the root of the search.
  2. Second, BFS gives the shortest path only if the graph is unweighted.

-------------------------------------------------------------------------------------------------------------------------------

 

你可能感兴趣的:(Algorithm)