ajay-dhangar / algo

This repository contains a collection of data structures and algorithms implemented in various programming languages. It is designed to help learners understand key concepts through hands-on examples. Contributions and improvements are welcome!
https://ajay-dhangar.github.io/algo/
MIT License
68 stars 202 forks source link

[Feature Request] : Adding Bellman-Ford Algorithm. #525

Open AbhijitMotekar99 opened 2 weeks ago

AbhijitMotekar99 commented 2 weeks ago

🚀 Feature Request

Is your feature request related to a problem? Please describe.

I'm frustrated when I need to find the shortest path in a graph with negative weight edges, but there’s no implementation of the Bellman-Ford algorithm available.

Describe the solution you'd like

The addition of the Bellman-Ford Algorithm documentation and code implementation, which efficiently computes shortest paths from a single source node to all other nodes in a graph, even when negative weight edges are present. It should include an explanation of how the algorithm works, its time complexity, and an example use case.

Describe alternatives you've considered

Alternatives include using Dijkstra's Algorithm, but Bellman-Ford is more suitable for graphs with negative weight edges, where Dijkstra's algorithm fails.

Additional context

Add real-world applications where the Bellman-Ford algorithm is used (e.g., detecting negative cycles in currency exchange rates) and a complete code implementation with examples.

Would you like to work on this feature?

Ruksina01 commented 2 weeks ago

Hello @ajay-dhangar ,

I am interested in this issue. Could you please assign it to me? Thank you!