Skip to content

Implement Bellman–Ford #87

@dionyziz

Description

@dionyziz

The current implementation only includes a way to find single source shortest paths in graphs with positive edges using Dijkstra. It would be useful to have an implementation where this restriction is not necessary. This would require the Bellman–Ford algorithm.

Ideally, I would like to see three functions: .dijkstra and .bellmanFord and simply .shortestPaths which chooses the appropriate underlying algorithm among the previous two. This would require keeping track of whether there are any negative edges (by counting them).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions