diff --git a/docs/graph/shortest-path.md b/docs/graph/shortest-path.md index e313f0c8c5a38..01918bec4e43a 100644 --- a/docs/graph/shortest-path.md +++ b/docs/graph/shortest-path.md @@ -54,7 +54,8 @@ author: du33169, lingkerio, Taoran-01 for (k = 1; k <= n; k++) { for (x = 1; x <= n; x++) { for (y = 1; y <= n; y++) { - f[k][x][y] = min(f[k - 1][x][y], f[k - 1][x][k] + f[k - 1][k][y]);  + f[k][x][y] = min(f[k - 1][x][y], f[k - 1][x][k] + f[k - 1][k][y]); + } } }