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)

https://en.wikipedia.org/wiki/breadth-first_search


Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -