134. Gas Station
- - - - - - - -
i j- conclusion: Assume that
ican reachjat the farthest. We should considerj+1next time.
Why do the stations between i and j no longer need to be considered?
Let's illustrate this using proof by contradiction.
Assume that i+1 meets the requirements and it can complete a circle.
At first wo move from i to i+1, and then from i+1 to j+1 So we can reach j+1 from i.
But i only can reach j. There's contradiction and the proof is complete.