Hi, please, I want the shortest path algorithm using arrays (Data structure) and the path passing through all the points once and return back to the initial point. ex:
0-1-4-2-3-5-0 (path cost=10)
0-3-2-5-4-1-0 (path cost=15)

so 0-1-4-2-3-5-0 is the correct answer.

Did you ask google?

yes but I get dijkstra's algorithm, and dijkstra get the shortest path but not passing through all the points..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.