feat(content): more test cases
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user