feat(content): hidden test cases
This commit is contained in:
@@ -11,6 +11,28 @@ patterns:
|
||||
- binary-search
|
||||
- prefix-sum
|
||||
|
||||
function_signature: "def min_subarray_len(target: int, nums: list[int]) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { target: 7, nums: [2, 3, 1, 2, 4, 3] }
|
||||
expected: 2
|
||||
- input: { target: 4, nums: [1, 4, 4] }
|
||||
expected: 1
|
||||
- input: { target: 11, nums: [1, 1, 1, 1, 1, 1, 1, 1] }
|
||||
expected: 0
|
||||
hidden:
|
||||
- input: { target: 5, nums: [5] }
|
||||
expected: 1
|
||||
- input: { target: 6, nums: [5] }
|
||||
expected: 0
|
||||
- input: { target: 15, nums: [1, 2, 3, 4, 5] }
|
||||
expected: 5
|
||||
- input: { target: 100, nums: [1, 1, 1, 1, 1, 1, 1] }
|
||||
expected: 0
|
||||
- input: { target: 3, nums: [1, 1, 1, 1, 1] }
|
||||
expected: 3
|
||||
|
||||
description: |
|
||||
Given an array of positive integers `nums` and a positive integer `target`, return *the **minimal length** of a subarray whose sum is greater than or equal to* `target`. If there is no such subarray, return `0` instead.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user