Created
October 23, 2015 18:51
-
-
Save arknave/0f6b69605230e998f8a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assume N is the number of vertices | |
for (int k = 0; k < N; k++) { | |
for (int i = 0; i < N; i++) { | |
for (int j = 0; j < N; j++) { | |
dist[i][j] = min(dist[i][j], | |
dist[i][k] + dist[k][j]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment