in reply to Sorting problem
Basically, you are given a graph by its set of edges. I changed the input to
You can visualize the graph in Graphviz:
Now, you want to turn in into a weighted graph. The original edges will have weight 1. Any combination of two edges (e.g. 01 -- 072) will have weight 2, and so on. Then, you are just searching for the lightest path that visits all the nodes. You did not specify in what node to start.
|
|---|