C-Plus-Plus
C-Plus-Plus copied to clipboard
[FEATURE] Adding detailed solution of Detect a negative cycle in a Graph problem
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
Hi I would like to work on this, please assign me
Hi I would like to work on this, please assign me.
Hello, Can you please assign this issue to me? Thanks in advance :)
Can you please assign to me ?
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.
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!