What filename do you want to read? Vertices: a b c d e f s Edges: a -> b: 6 a -> d: 1 b -> e: 1 c -> a: 2 c -> d: 4 d -> e: 4 f -> e: 2 s -> c: 2 s -> f: 6 s -> a: 3 Visiting s Updating dist[c] from 9999999 to 2. Updating dist[f] from 9999999 to 6. Updating dist[a] from 9999999 to 3. Visiting c Updating dist[d] from 9999999 to 6. Visiting a Updating dist[b] from 9999999 to 9. Updating dist[d] from 6 to 4. Visiting d Updating dist[e] from 9999999 to 8. Visiting f Visiting e Shortest path is: s a d e Distance is: 8 Final dist map: a: 3 b: 9 c: 2 d: 4 e: 8 f: 6 s: 0 Final prev map: a: s b: a c: s d: a e: d f: s s: