Hi,

i want to write an algorithm to list out possible paths in subway train maps from one station to another station (A to G). I am planning to use the breadth first search. Is it good? Thanks.

Yea,
breadth first search is the simplest way to find the shortest bath between 2 nodes or in your case between to stations, it will also tell you if it is possible to get from one stations to another, so I would say yes, breath first search is probably you best bet in your circumstance.

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.