• + 0 comments
    func jumpingOnClouds(c: [Int]) -> Int {
        // Write your code here Swift
        var jump = 0
        var i = 0
       repeat{
            if i+2 < c.count && c[i+2] == 0{
                i += 2
            }else{
                i += 1
            }
            jump += 1
    				
            
        } while i < c.count - 1
        
        return jump
    }