Answers for "jumping on the clouds hackerarnk solution in javascrit"

0

jumping on the clouds hackerarnk solution in javascrit

let jumps = 0;
let currentIndex =0;
while(currentIndex<c.length-1){
if(c[currentIndex+2]==0){
jumps += 1
currentIndex+=2;
}
else if(c[currentIndex+1]==0){
    jumps+=1
    currentIndex+=1;
}
}
return jumps
Posted by: Guest on March-28-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language