Skip to content

karimitanii/Dynamic-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Minimum Cost to Destination - Train & Bus (Dynamic Programming)

Problem Statement

You are given a transportation system consisting of trains and buses. Each mode of transport has an associated travel cost at every station, and there is an additional cost for switching between bus and train at any station. The goal is to determine the minimum cost to reach the final destination while optimizing the switching between train and bus.

Approach

This problem is solved using Dynamic Programming (DP) with O(n) time complexity.

Languages Used

  • Java
  • Python

About

minimum cost for arriving to destitation through train and bus and cost of switching between them

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors