You are viewing a single comment's thread. Return to all comments →
C++
int jumpingOnClouds(vector<int> &c) { int cnt = 0; for (int j = 0; j < c.size() - 1; j = j + 2) { if (c[j + 2] == 1) { j--; cnt++; } else { cnt++; } } return cnt; }
Seems like cookies are disabled on this browser, please enable them to open this website
Jumping on the Clouds
You are viewing a single comment's thread. Return to all comments →
C++