Hi,
I have graph in C. I enter vertexes and edges with price.
Now I would like add path, where I visit only few of the vertexes and then I would like to print this path. I don't know how to do it, so I am asking you here....

Recommended Answers

What's the logic for the path? Is it the shortest path between A and B? Longest? Ad hoc based on input?

Jump to Post

All 3 Replies

What's the logic for the path? Is it the shortest path between A and B? Longest? Ad hoc based on input?

What's the logic for the path? Is it the shortest path between A and B? Longest? Ad hoc based on input?

For example, we have graph:
1-2- 3
| \ | / |
4 5 6

I already have function for shortest path. Now I want to enter shortest path, which visit all vertexes except vertex 4

so you actually want the longest path?

idea - make each "price" -1 ?

Be a part of the DaniWeb community

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