This section contains some of the algorithms which are used to find shortest paths in a Graph.
Shortest Path Algorithm in Unweighted Graph Using BFS
The shortest path between two vertices or nodes in a graph is the path that has the minimum number of edges or the minimum total weight if the graph is weighted between the two vertices. In other words, it is the path that requires the
Dijkstra's Shortest Path Algorithm
Dijkstra's shortest path algorithm is used to efficiently determine the shortest path between a starting node and an ending node in a graph, where each edge has a non-negative weight or cost associated with it. This algorithm is
Bellman-Ford Shortest Path Algorithm
The Bellman-Ford algorithm is a type of dynamic programming algorithm used to find the shortest paths from a single source vertex to all other vertices in a weighted graph. This algorithm is particularly useful when dealing with graphs