Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Dynamic programming - optiaml rute time
I have following problem to solve:
Please take a look at the photo:
4 - number of stations
3 - number of changes between stations
15 3 2 10 7 - time of traveling betwen bus station
2 25 30 1 10 - time of traveling betwen railway station
7 10 5 1 - time to travel from bust station to railwey station
10 8 5 5 - time to travel form railwey station to bus station
I need to solve the problem using dynamic programming.
I write some code in ansi C that works properly but for input files with number of stations larger than 100 the algorithm becoming very very slov. How to solve the task properly? Any Tips?