finished gas station II with O(n) complexity