Negative Cycle in Directed weigthed graph

Revision en2, by 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.

Tags #doubt, #graph theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Peace_789 2020-06-11 22:04:33 2 Tiny change: 'd.\n\n**Fell free to ' -> 'd.\n\n**Feel free to '
en1 English Peace_789 2020-06-11 21:59:49 3326 Initial revision (published)