PythiloMedium · 25 min · Task 64 of 100 · progress kept in this browser

Minimum jumps to the end

Return the fewest jumps to reach the final index, or -1 if impossible. Values are nonnegative maximum jump lengths. Empty input returns -1.

layer_end, farthest = 2, 4
print(farthest > layer_end)  # another layer
Your task

Return the fewest jumps to reach the final index, or -1 if impossible. Values are nonnegative maximum jump lengths. Empty input returns -1.