Now the graph direction has been reversed we can run dijkstra just on the root nodes to find all deps