Walk from i to j, when you find this path not valid, it means all points from i to j are not valid start points. Try the next point. When i >= n, quit!

```
class Solution {
public:
int canCompleteCircuit(vector<int>& gas, vector<int>& cost) {
int n = gas.size();
for(int i = 0; i < n; i++){
bool flag = true;
int mygas = 0;
for(int j = 0; j < n; j++){
mygas = mygas + gas[(i + j) % n] - cost[(i + j) % n];
if(mygas < 0){
i = i + j;
flag = false;
break;
}
}
if(flag) return i;
}
return -1;
}
};
```