feat(content): hidden test cases

This commit is contained in:
2025-08-06 23:21:42 +01:00
parent 89b5dd1457
commit 6bed0a6787
134 changed files with 2075 additions and 0 deletions

View File

@@ -11,6 +11,26 @@ patterns:
- binary-search
- greedy
function_signature: "def split_array(nums: list[int], k: int) -> int:"
test_cases:
visible:
- input: { nums: [7, 2, 5, 10, 8], k: 2 }
expected: 18
- input: { nums: [1, 2, 3, 4, 5], k: 2 }
expected: 9
hidden:
- input: { nums: [1, 4, 4], k: 3 }
expected: 4
- input: { nums: [10, 5, 13, 4, 8, 4, 5, 11, 14, 9, 16, 10, 20, 8], k: 8 }
expected: 25
- input: { nums: [1, 2, 3, 4, 5], k: 1 }
expected: 15
- input: { nums: [1, 2, 3, 4, 5], k: 5 }
expected: 5
- input: { nums: [2, 3, 1, 2, 4, 3], k: 5 }
expected: 4
description: |
Given an integer array `nums` and an integer `k`, split `nums` into `k` non-empty subarrays such that the largest sum of any subarray is **minimized**.