C-Plus-Plus icon indicating copy to clipboard operation
C-Plus-Plus copied to clipboard

[FEATURE] Adding detailed solution of Detect a negative cycle in a Graph problem

Open naksh2004 opened this issue 2 years ago • 4 comments

Detailed description

We are given a directed graph. We need to compute whether the graph has a negative cycle or not. A negative cycle is one in which the overall sum of the cycle becomes negative. Negative weights are found in various applications of graphs. For example, instead of paying cost for a path, we may get some advantage if we follow the path.

Context

The idea is to use Bellman-Ford Algorithm which solves the problem in time complexity O(n*m) and space complexity: O(n)

Possible implementation

Using Bellman-Ford Algorithm

Additional information

No response

naksh2004 avatar Oct 04 '22 08:10 naksh2004

Hi I would like to work on this, please assign me

yashvardhansingh15 avatar Oct 06 '22 08:10 yashvardhansingh15

Hi I would like to work on this, please assign me.

tiiitu avatar Oct 13 '22 11:10 tiiitu

Hello, Can you please assign this issue to me? Thanks in advance :)

Sakshi2002-Sinha avatar Oct 13 '22 19:10 Sakshi2002-Sinha

Can you please assign to me ?

dibyasree02 avatar Oct 17 '22 18:10 dibyasree02

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 25 '23 00:02 github-actions[bot]

Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

github-actions[bot] avatar Mar 05 '23 00:03 github-actions[bot]