Negative Cycle in Directed weigthed graph

Правка en2, от Peace_789, 2020-06-11 22:04:33

Hello everyone...

First of all sorry but I am writing the blog on same doubt again because there was some issues with code in last blog.

So , recently I was solving this problem ...

Problem statement

I am aware of solving this problem using Bellman Ford's Algorithm , But I am trying another approach which is giving me WA in 1 Test Case (total 13 is there) .

So , Can anyone point out whether this approach is correct or not ... and If it is correct then suggest me some modification else give some counter examples where this code might fail.

Code

Any kind of help will be appreciated.

**Feel free to downvote but help me if you know the answer ;) **

THANKS.

Теги #doubt, #graph theory

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Peace_789 2020-06-11 22:04:33 2 Tiny change: 'd.\n\n**Fell free to ' -> 'd.\n\n**Feel free to '
en1 Английский Peace_789 2020-06-11 21:59:49 3326 Initial revision (published)