feat(content): function signatures + test cases

This commit is contained in:
2025-07-13 19:53:34 +01:00
parent 9e6c6d256f
commit 65a8d525f5
203 changed files with 4526 additions and 0 deletions

View File

@@ -11,6 +11,28 @@ patterns:
- sliding-window
- dynamic-programming
function_signature: "def can_reach(s: str, min_jump: int, max_jump: int) -> bool:"
test_cases:
visible:
- input: { s: "011010", min_jump: 2, max_jump: 3 }
expected: true
- input: { s: "01101110", min_jump: 2, max_jump: 3 }
expected: false
hidden:
- input: { s: "00", min_jump: 1, max_jump: 1 }
expected: true
- input: { s: "01", min_jump: 1, max_jump: 1 }
expected: false
- input: { s: "0000", min_jump: 1, max_jump: 3 }
expected: true
- input: { s: "00000000", min_jump: 3, max_jump: 5 }
expected: true
- input: { s: "0100000", min_jump: 2, max_jump: 5 }
expected: true
- input: { s: "01111110", min_jump: 1, max_jump: 6 }
expected: false
description: |
You are given a **0-indexed** binary string `s` and two integers `minJump` and `maxJump`. In the beginning, you are standing at index `0`, which is equal to `'0'`. You can move from index `i` to index `j` if the following conditions are fulfilled: