Test case where Bellman-ford must go till (V-1)th iteration to give the right answer?

Правка en1, от Sportsman, 2020-08-27 00:35:08

I recently came across the Bellman-ford algorithm and tried to understand the intuition behind, why the Bellman-Ford algorithm takes atmost V-1 iterations to give the correct ouput. It would be helpful if you could share the reason or probably a test case or both, so that i can do a dry run to digest it. Thanks!

Теги graphs, bellman-ford

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Sportsman 2020-08-27 00:35:08 400 Initial revision (published)