You are viewing a single comment's thread. Return to all comments →
def jumpingOnClouds(c, k): e: int = 100 n: int = len(c) idx: int = (0 + k) % n while True: e -= 1 if c[idx] == 1: e -= 2 if idx == 0: break idx = (idx + k) % n return e
Seems like cookies are disabled on this browser, please enable them to open this website
Jumping on the Clouds: Revisited
You are viewing a single comment's thread. Return to all comments →