CONFUSION - Breadthfirst search

hi there,

For an assignment at my uni I have to create a program that takes a train network and calculates the shortest path from one station to the other. The line the station is on is not relevant.

so out put will just be a list of stations the user must go through to get to the destination,

I am thinking of doing Breadthfirst search to accomplish this. what type of graph is going to be needed?

im guessing undirected unweighted graph....do you need to have a adjacencylst? or matrix?

thanks guys

Re: CONFUSION - Breadthfirst search

Re: CONFUSION - Breadthfirst search

That depends what your problem specification is, if it is directed and weighted graph, or directed, unweighted, or undirected weighted or undirected unweighted graph. Depends upon the problem. And if not mention, i';; recommend you to go for undirected unwieghted graph for working fast but if you really want to enjoy doing programming, do directed, weighted graph or undirected, weighted graph and find the smallest and efficient path.