For the Floyd-Warshall's algorithm, the order of the loops is k, i, and j. What happens if I screw up the order of the loops and accidentally write it as i, k, and j? In what way will the program not work? Thanks!
Asked
Active
Viewed 236 times
2
-
3You get the Woyd-Flarshall algorithm, which produces dangerously bad jokes about computer science. – j_random_hacker Dec 17 '12 at 13:59
-
An interesting bit of trivia is that the algorithm will still be correct, as long as you run it three times (see https://arxiv.org/abs/1904.01210). – Evan Bailey Jul 26 '23 at 16:30