tiles: '0' is a sound tile and '1' is a cracked one you must not step on. You start on tile 0, which is always sound.
In one jump from tile i you can land on any tile j with i + min_step ≤ j ≤ i + max_step, as long as j is still on the path and tile j is sound.
Return True if you can reach the last tile, and False otherwise.tiles="0010100", min_step=2, max_step=3 → True
From tile 0 you can land on 2 or 3; tile 2 is cracked, so go to 3. From tile 3 both 5 and 6 are intact, so jump straight to the last tile, 6.
tiles="00110", min_step=1, max_step=1 → False
Every jump is exactly one tile: 0 to 1, and then tile 2 is cracked, so there is no way forward.
tiles contains only '0' and '1'tiles[0] == '0'tiles="0010100", min_step=2, max_step=3
True
Run checks the first 3 tests in your browser. Submit checks all 43 tests on the server, hidden ones included.