Given a directed graph G , weights, s source vertex and d[v] for each vertex in the graph (the distance from s to v) I need to find an algorithm that builds the shortest paths graph.
I was thinking of going on edges by BFS but than how can I know which edge should be in the tree and how to check that the d[v] for each vertex is true.
d[v]seems redundant.