You are viewing a single comment's thread. Return to all comments →
def jumpingOnClouds(c): n = len(c) i = 0 jumps = 0 while i < n - 2: if c[i+2] == 0: i = i +2 else: i = i +1 jumps = jumps + 1 return jumps +1 if i < n - 1 else jumps
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 →
Python