I need help

I want to do something like this:

In dijkstra algo; we've source, destination. And we've cost as input, which determines the cost between two vertexes; i.e., value of node.
What I want to do, based on source and destination, is it reachable from a node to another(such as node0 to node3, or node1 to node3) or not.

For example,
if size of matrix=4,
source=0,
destination=3;
then my program should display-
0 -> 3 is reachable

or,
0 -> 3 isn't reachable


How can I start? I know only one thing- the output should be as I quoted earlier. What should be the inputs of the matrix?

Can anyone give me hints or suggestions?
Topic archived. No new replies allowed.