feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent d2b74b6863
commit 85fea3a4bb
94 changed files with 1840 additions and 0 deletions

View File

@@ -10,6 +10,24 @@ patterns:
- greedy
- dynamic-programming
function_signature: "def can_jump(nums: list[int]) -> bool:"
test_cases:
visible:
- input: { nums: [2, 3, 1, 1, 4] }
expected: true
- input: { nums: [3, 2, 1, 0, 4] }
expected: false
hidden:
- input: { nums: [0] }
expected: true
- input: { nums: [2, 0, 0] }
expected: true
- input: { nums: [1, 0, 1, 0] }
expected: false
- input: { nums: [5, 4, 3, 2, 1, 0, 0] }
expected: true
description: |
You are given an integer array `nums`. You are initially positioned at the array's **first index**, and each element in the array represents your maximum jump length at that position.