title: Greedy algorithm for finding minimum numbers of stops
body: <p>Mr X is traveling by car on an expressway. Suppose there are several gas (petrol) stations
  on the way: at distances 0 = d0 &lt; d1 &lt; d2 &lt; ... &lt; dn from the starting point d0. </p>
  
  <p>Mr X’scar, when full, can travel a distance D >= max{di+1 - di} . 
  Mr X wants to minimize the number of stops he makes to fill gas.</p>
  
  <p>Devise an greedy algorithm that return min numbers of stops needed. </p>