Graph Theory37 sections · 1633 units
Open in Course

Quiz: Floyd-Warshall Loop Order

Knowledge check

Check Your Understanding

Floyd-Warshall uses 33 nested loops: kk, ii, jj. What happens if you put kk as the innermost loop instead of the outermost?

  1. A.The algorithm runs faster due to better cache performance
  2. B.The algorithm produces wrong answers because intermediate vertices are not fully processed before being used
  3. C.The algorithm still works but uses more memory
  4. D.The algorithm works for undirected graphs but fails for directed ones
Start the roadmap to answer the quizzes and solve the challenges