• + 0 comments
    function jumpingOnClouds(c: number[]): number {
        let jumps = 0
        for(let i=0; i < c.length - 1; i++){
            const nextDoubleCloud = c[i + 2]
            if(nextDoubleCloud == 0) {
                i++
            }
            jumps++
        }
        return jumps
    }