Qm

Enough fuel for exactly one lap

Several fuel stations are placed at arbitrary points around a circular road. Between them they hold exactly the amount of fuel needed for a car to drive once around the whole circle. The car has an unlimited-capacity tank but starts empty, and it may only take fuel from a station when it is at that station.

Prove that there is at least one station from which the car can start, driving in the clockwise direction, and complete the entire lap without ever running out of fuel.

Show a hint

Pretend the car starts anywhere with a large enough loan of fuel to make the lap, and plot the fuel gauge as it goes round. Where should the real start be?

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

The 100 lockers problemThe 24-stone game where taking the last stone losesAnts falling off a rodTiling a hexagon with lozengesChameleons changing colors
All questions →