Challenge: Car Fueling

Solve the Car Fueling Problem.

We'll cover the following...

Problem


Car Fueling Problem

Compute the minimum number of gas tank refills to get from one city to another.

Input: Integers dd and mm, as well as a sequence of integers: stop1<stop2<<stopnstop_{1} < stop_{2} < \ldots < stop_{n} ...