We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
funcjumpingOnClouds(c:[Int])->Int{// Write your code here Swiftvarjump=0vari=0repeat{ifi+2<c.count&&c[i+2]==0{i+=2}else{i+=1}jump+=1}whilei<c.count-1returnjump}
Cookie support is required to access HackerRank
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 →