DirectedGraph: implemented shortestPath