Skip to content

Feat(Graph): Implement Bellman-Ford Algorithm for Negative Edge Weights #1191

@rgajbhiyee

Description

@rgajbhiyee

The repository currently covers shortest paths using Dijkstra's Algorithm, which fails on graphs containing negative edge weights. To complete the set of fundamental shortest-path algorithms, we need to add the Bellman-Ford Algorithm.
Goal:

  1. Find the shortest path from a single source vertex to all other vertices.
  2. Correctly detect and report a negative cycle if one exists in the graph.

C++ solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions