rewrite leetcode gas station