You are viewing a single comment's thread. Return to all comments →
JavaScript
function jumpingOnClouds(c, k) { let e=100, i=0; while(i < c.length){ e = (c[i] === 1) ? e -= 3 : e -= 1; i += k; if(i === c.length) break; else if(i > c.length) i -= c.length; } return e; }
Seems like cookies are disabled on this browser, please enable them to open this website
Jumping on the Clouds: Revisited
You are viewing a single comment's thread. Return to all comments →
JavaScript