Program 2: Dijkstra's Shortest Path
Write a program that implements Dijkstra's shortest path algorithm. The program's input will be a graph (G) and starting node (S) such that G = (V, E), where V is a set of nodes (or vertices) and E is a set of edges. Your program should support up to 10 nodes. Graph data may be input by command line, but text input is recommended (no hardcoding of graph data allowed for your final submission).
Input: graph G and starting node S
Output: Shortest Distances from S to every other node and Previous Node in the Path
Example: Please input your graph below:
List all Vertices V in your graph. Vertices: A B C D E F
List each edge connected to A with associated cost: Edges B1
List each edge connected to B with associated cost: Edges C3 D2 E1
List each edge connected to C with associated cost: Edges E4
List each edge connected to D with associated cost: Edges E2
List each edge connected to E with associated cost: Edges F3
List each edge connected to F with associated cost: Edges 00
Which node are you starting from?: A
Shortest Distances from A to:
Node Cost Previous Node
B 11 A