Hi everyone, I am struggling with a graph algorithm problem in my Data Structures Lab assignment.
I am given a weighted graph with N number of vertices. We have a starting point and we want to travel and visit as much vertices as possible, but within a given maximum weight. Do you have an algorithm for that?
P.S. I am familiar with C++, so I will really appreciate it if you solve this problem with C++.
What I have tried:
Someone said to me that the problem can be solved with simple Dijkstra Search, but I don't see how the shortest path between two nodes can solve this problem.
I also tried to figure if it can be solved with Prim's or Kruskal's algorithms, but no luck.