Guest_imported
New member
- Jan 1, 1970
- 0
Does ne one has the implementation of shortest path from one to many nodes using DIjkstra's Algorithm.
I am using binary heap implementation. I have successfully implmented the one to one shortest path Dijkstra's algorithm but facing some probelm in implementing the one to many versions.
Problem I am facing is I have found the shortest path between few pairs but if the path doesnot exists between the two pairs then instead of showing no path message it is showing me some junk values. Actually I am recursively doing the dijkstra'a without permanently labeling the visited nodes as I may need to visit the same node again and again. There is some probelm in the code if some one can give me a hint where I may be wrong or even can give me the implmentation of the same , my rpobelm will solved.
I am using binary heap implementation. I have successfully implmented the one to one shortest path Dijkstra's algorithm but facing some probelm in implementing the one to many versions.
Problem I am facing is I have found the shortest path between few pairs but if the path doesnot exists between the two pairs then instead of showing no path message it is showing me some junk values. Actually I am recursively doing the dijkstra'a without permanently labeling the visited nodes as I may need to visit the same node again and again. There is some probelm in the code if some one can give me a hint where I may be wrong or even can give me the implmentation of the same , my rpobelm will solved.