Skip to content

Commit 32e3075

Browse files
New Commit
1 parent c2a0a2c commit 32e3075

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dijkstra's_algo.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ void Dijkstra(int Graph[MAX][MAX], int n, int start) {
88

99
// Creating cost matrix
1010
for (i = 0; i < n; i++)
11-
for (j = 0; j < n; j++)
11+
for (j = 0; j < n; j++){
1212
if (Graph[i][j] == 0)
1313
cost[i][j] = INFINITY;
1414
else
1515
cost[i][j] = Graph[i][j];
16-
16+
}
17+
1718
for (i = 0; i < n; i++) {
1819
distance[i] = cost[start][i];
1920
pred[i] = start;

Dijkstra's_algo.exe

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)