Student Transportation Expenses NU has very diverse students from different places. To reach the campus, each student must go through a sequence of stations to get to campus. Assume within the ith station you can pay x; to either get to station (i + 1) or (i + 2). At CSCI-304, we want to help our colleagues minimize their expenses to campus-it would be great especially after COVID-19. Input: expenses : array listing expenses to be paid at each station to move its values are non-negatives, and it has at least 2 values Output: m: the expenses of transportation to the campus Note the campus station is execluded Example: Assume the below table contains the expenses per each station Station Cost 1 1 2 3 3 6.5 4 2 5 Algorit 6 8
Algorithms
Student Transportation Expenses NU has very diverse students from different places. To reach the campus, each student must go through a sequence of stations to get to campus. Assume within the ith station you can pay x; to either get to station (i + 1) or (i + 2). At CSCI-304, we want to help our colleagues minimize their expenses to campus—it would be great especially after COVID-19.
Input: expenses : array listing expenses to be paid at each station to move its values are non-negatives, and it has at least 2 values
Output: m: the expenses of transportation to the campus Note the campus station is execluded
Example: Assume the below table contains the expenses per each station Station Cost 1 2 3 4 5 6 3 6.5 2 2 8
**In Python notebook**
Step by step
Solved in 2 steps with 2 images