I am working on a graph problem in which I have to implement graph for which I am given two starting nodes and the two target nodes respectively. I also have to maintain the distance between the nodes through the entire path. Is there any suggestion?
Share
use the a-star algorithm to explore the graph as you move, to maintain the distance between the nodes. A-star on wikipedia this should serve your purpose.