• + 0 comments

    Here is my Python solution!

    def jumpingOnClouds(c):
        steps = 0
        index = 0
        while index != len(c) - 1:
            if len(c) - index <= 2:
                return steps + 1
            if c[index + 2] == 1:
                index += 1
            else:
                index += 2
            steps += 1
        return steps