Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Notice and evaluate the different ways there are to move from one stop to the next.
From the express route at a previous stop, we can use either the express route or the regular route to the next stop without paying expressCost.
From the regular route at a previous stop, we can either use the express route after paying expressCost or use the regular route without paying expressCost.
Iterate through the stops and compare the above cases to obtain the minimum costs for each stop.