Dijkstra shortest path algorithm
Opened this issue · 10 comments
Kanhakhatri065 commented
Implement Dijkstra shortest path algorithm in any language.
amarks444 commented
I would love to do it in C++ if you want?
kavya1229 commented
I will do it in python, please assign this to me
Kanhakhatri065 commented
@amarks444 do it in C++ and @kavya1229 do it in python.
amarks444 commented
Kanhakhatri065 commented
This looks good but can you also implement it for explicit graphs?
amarks444 commented
Yes, I would love to do it, Can you provide some test cases for that..
Kanhakhatri065 commented
g.addEdge(0, 1, 4);
g.addEdge(0, 7, 8);
g.addEdge(1, 2, 8);
g.addEdge(1, 7, 11);
g.addEdge(2, 3, 7);
g.addEdge(2, 8, 2);
g.addEdge(2, 5, 4);
g.addEdge(3, 4, 9);
g.addEdge(3, 5, 14);
g.addEdge(4, 5, 10);
g.addEdge(5, 6, 2);
g.addEdge(6, 7, 1);
g.addEdge(6, 8, 6);
g.addEdge(7, 8, 7);
The first one is source node, the second one is destination node and third value is weight of that edge.
amarks444 commented
I have Updated Dijkstras for Implicit Graphs using Set in STL ..#305
You can Merge it..
amarks444 commented
I have Updated Dijkstras for Implicit Graphs using Set in STL ..#305
You can Merge it..
You can Merge it..
Kanhakhatri065 commented
@amarks444 done.