Dijkstra Shortest Path Finder

Dijkstra Shortest Path Finder

Source Code:
Github: DijkstraShortestPathFinder.java


Output:

Graph:
{V(1),  [Edge (source=1, destination=2, weight=4.0), Edge (source=1, destination=3, weight=1.0)]
V(2),  [Edge (source=2, destination=5, weight=3.0), Edge (source=2, destination=4, weight=1.0)]
V(3),  [Edge (source=3, destination=2, weight=2.0), Edge (source=3, destination=4, weight=5.0)]
V(4),  [Edge (source=4, destination=5, weight=1.0)]
V(5),  []}


 Distance between V(1) and V(1) = 0.0, Path[1]
 Distance between V(1) and V(2) = 3.0, Path[2, 3, 1]
 Distance between V(1) and V(3) = 1.0, Path[3, 1]
 Distance between V(1) and V(4) = 4.0, Path[4, 2, 3, 1]
 Distance between V(1) and V(5) = 5.0, Path[5, 4, 2, 3, 1]

                

Author: Hrishikesh Mishra