search - Find the shortest path between two vertices a and b in a specified graph. Graph's properties are in the description. -
properties of graph:
graph has v vertices , e edges.
it connected, undirected , positive weighted.
graph has 1 cycle.
the goal find shortest path between 2 vertices , b in o(v) time.
a link similar question if there's 1 appreciated.
consider using breadth-first search
, o(v+e)
Comments
Post a Comment