Graph Theory37 sections · 1633 units
Open in Course

Quiz: Cycle Reconstruction

Knowledge check

Check Your Understanding

When reconstructing a negative cycle, you find a node vv that gets relaxed on the nn-th iteration. You follow parent pointers from vv exactly nn times. Why nn times?

  1. A.It guarantees you land inside the cycle, not on a path leading to it
  2. B.Because the cycle has exactly nn nodes
  3. C.Because the parent array has exactly nn entries
  4. D.Because Bellman-Ford always finds cycles of length nn
Start the roadmap to answer the quizzes and solve the challenges