You are viewing a single comment's thread. Return to all comments →
In C#
public static int jumpingOnClouds(List<int> c) { int jumps = 0; int position = 0; while (position < c.Count - 1) { if (position + 2 < c.Count && c[position + 2] == 0) { position += 2; } else { position += 1; } jumps++; }
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 →
In C#
}