dijkstra algorithm example directed graph