Skip to content
Snippets Groups Projects
Commit 42f31e54 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

update

parent 2b9cf766
No related branches found
No related tags found
No related merge requests found
Pipeline #11833 passed
......@@ -68,7 +68,7 @@ void dijkstra(graph g, int src, int num, int dist[num], int prev[num]) {
while (!queue_is_empty(q)) {
p = queue_pop(q);
for v in the neighborhood_of(g, p) {
d_new = dist[v] + weight(g, p, v);
d_new = dist[p] + weight(g, p, v);
if (d_new < dist[v]) {
dist[v] = d_new;
prev[v] = p;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment