Minimum toll checkpoint cost
Your task
A toll road on your trip has checkpoints in order, with a fee listed for each. You start standing on the first checkpoint (and pay its fee), and you must finish standing on the last one. From any checkpoint you may drive ahead to the next checkpoint or skip one and land two ahead; you pay the fee of every checkpoint you land on. Given the fees, return the minimum total you must pay. The list has at least one checkpoint.
Examples
min_toll_cost(fees: list[int]) -> intExample 1
Input
min_toll_cost([1, 100, 1, 1, 100, 1])Output
4Example 2
Input
min_toll_cost([10, 1, 10, 1, 10])Output
22