Hello i'm trying to find the best algorithm to solve this problem.
I have a a graph that i must find the shortest path between Start and End node specified but that must pass on specific user input nodes.
There is no order for the must pass nodes and you can visit more than once each node.
If i consider each must pass node need to be reached on a specific order calculating the shortest path to each stop first would be easier right?
Is K Shortest path the way to go to solve this problem? Calculate the shortest Path and go from there, till we find the shortest that pass on all must pass nodes?
Here is an example graph i draw
Nodes 4 and 6 are must pass, and i need to find shortest path between 1 and 5.