Requirements:
There are multiple targets that you need to visit on a graph (does not matter what order or how many times you visit each point)
You can start from the starting point, visit all the targets and come back to the base.
You are allowed to visit each target multiple times.
Question:
1) What algorithm should I use to approach this?
2) My proposed approach
Let's say targets = [A, B, C]
- I am thinking to use Dijkstra's algorithm to find the shortest path to any of the targets.
- Once I reach the target, I use Dijstra's to find any of the remaining targets.
- Once I have found all the targets, I will use Dijstra's to find the path back to the starting point.
- This should give me the shortest path to find all the targets and back home