clueless2334
clueless2334

Reputation: 1

Which algorithm to use when finding shortest path in multiple overlapping datasets?

I've been tasked with writing an algorithm in Python that is able to establish the shortest journey on a metro train system. The train network has multiple train "lines", which consist of different stations. Some stations are featured on multiple different lines. It essentially works exactly the same as the London tube network. I've been given the stations and the lines, as well as the time between each station, which will act as the cost in the algorithm. Could someone give me a brief idea of how I should approach this? Thanks.

I'm aware Dijkstra's would be the best algorithm to use for this, I'm just having trouble wrapping my head around how to actually approach it.

Upvotes: 0

Views: 189

Answers (0)

Related Questions