What filename do you want to read? Vertices: a b c d e f Edges: a -> e: 14 a -> f: 9 a -> b: 7 b -> a: 7 b -> c: 15 b -> f: 10 c -> b: 15 c -> d: 6 c -> f: 11 d -> c: 6 d -> e: 10 e -> a: 14 e -> d: 10 e -> f: 2 f -> a: 9 f -> b: 10 f -> c: 11 f -> e: 2 Visiting a Updating dist[e] from 9999999 to 14. Updating dist[f] from 9999999 to 9. Updating dist[b] from 9999999 to 7. Visiting b Updating dist[c] from 9999999 to 22. Visiting f Updating dist[c] from 22 to 20. Updating dist[e] from 14 to 11. Visiting e Updating dist[d] from 9999999 to 21. Visiting c Visiting d Shortest path is: a f e d Distance is: 21 Final dist map: a: 0 b: 7 c: 20 d: 21 e: 11 f: 9 Final prev map: a: b: a c: f d: e e: f f: a