I got this question in an interview and I was not able to solve it.
You have a circular road, with N number of gas stations. You know the ammount of gas
The task is really open. As you do a cycle, so the best option is to start from the station that have largest enough fuel amount. This mean that you will be able to tank your car and drive to next nearest station.
When we have a place to start we only have to decide on which gas station we need to stop. For the first run we can stop an every station.
EDIT.
Small improvement that came up after discussion with Lasse V. Karlsen.
If the selected first station will not succeed to make the cycle. Then select next one in the same way with smaller* fuel/road proportion.
*Smaller then first selected station proportion.