-
Notifications
You must be signed in to change notification settings - Fork 243
Open
Description
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
Labels
No labels