Bellman-Ford

10 分钟

把所有边松弛 n-1 轮。为什么是 n-1 轮?因为最短路最多经过 n-1 条边。

小纸条

第 n 轮还能松弛说明什么?

登录 后可看答案

Bellman-Ford · 算法进阶 · op599 课程