feat : Add the Bellman-Ford Shortest Path Algorithm in R#192
Merged
siriak merged 4 commits intoTheAlgorithms:masterfrom Oct 12, 2025
Merged
feat : Add the Bellman-Ford Shortest Path Algorithm in R#192siriak merged 4 commits intoTheAlgorithms:masterfrom
siriak merged 4 commits intoTheAlgorithms:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a comprehensive implementation of the Bellman-Ford shortest path algorithm to the R algorithms collection. The implementation supports negative edge weights and negative cycle detection, making it a valuable addition to the graph algorithms section.
Key changes:
- Implementation of the Bellman-Ford algorithm with educational documentation and examples
- Addition of helper function for path reconstruction
- Creation of dedicated documentation explaining the algorithm's characteristics and usage
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| graph_algorithms/bellman_ford_shortest_path.r | Core implementation of Bellman-Ford algorithm with comprehensive documentation, examples, and helper functions |
| documentation/bellman_ford_shortest_path.md | Standalone documentation explaining algorithm characteristics, usage patterns, and implementation notes |
| DIRECTORY.md | Updated project index to include the new Bellman-Ford algorithm in the graph algorithms section |
siriak
requested changes
Oct 11, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a well-documented implementation of the Bellman–Ford single-source shortest-path algorithm, supporting negative edge weights and negative-cycle detection. It also includes clear documentation and updates the project index, making it an educational and easy-to-follow addition to the collection of graph algorithms.