You are viewing a single comment's thread. Return to all comments →
This is a bit more simple:
static int jumpingOnClouds(int[] c) { int jumps = 0; for(int i = 0; i < c.Length - 1; i++){ jumps++; if( i + 2 < c.Length && c[i + 2] == 0){ i++; } } return jumps; }
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 →
This is a bit more simple: