Graph Theory37 sections · 1633 units
Open in Course

Quiz: Bounded Relaxation

Knowledge check

Check Your Understanding

You are solving "cheapest flights within kk stops" using Bellman-Ford. You run k+1k+1 iterations but forget to copy the distance array before each iteration. What goes wrong?

  1. A.The algorithm becomes slower than O(VE)O(V \cdot E)
  2. B.The algorithm detects a false negative cycle
  3. C.Nothing goes wrong. The copy is an unnecessary optimization
  4. D.You might use paths with more than kk stops because updates within one iteration chain together
Start the roadmap to answer the quizzes and solve the challenges