ProAlgos / ProAlgos-Cpp

C++ implementations of well-known (and some rare) algorithms, while following good software development practices
MIT License
508 stars 363 forks source link

Bellman-Ford #401

Closed dcyrus closed 3 years ago

dcyrus commented 3 years ago

Bellman-Ford Implementation using Dynamic Programming

The Bellman-Ford algorithm uses relaxation to find single-source shortest paths on directed graphs. And it also contains negative edges. The algorithm will also detect if there are any negative weight cycles

Time complexity is O(VE) Space Complexity is O(V)

*Where V represents vertices and E represent edges

stale[bot] commented 3 years ago

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