I want to find shortest path from source to destination by visiting all the nodes in an undirected weighted graph. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I want to find shortest path from source to destination by visiting all the nodes in an undirected weighted graph.

I tried it by Dijkstra algorithm but it gives the shortest path from source to every node and also it doesn't visit all nodes.. Please help me with this.. It means a lot to me . Please help .

7th Dec 2019, 11:39 AM
Krishna Ravi
Krishna Ravi - avatar
1 Answer
0
depth first search or have a look at A* algorithm.
8th Dec 2019, 7:05 AM
Rohit Kh
Rohit Kh - avatar