feat(content): function signatures + test cases
This commit is contained in:
@@ -10,6 +10,28 @@ categories:
|
||||
patterns:
|
||||
- greedy
|
||||
|
||||
function_signature: "def min_sum(nums: list[int], k: int) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { nums: [1, 4, 25, 10, 25], k: 2 }
|
||||
expected: 5
|
||||
- input: { nums: [5, 6], k: 6 }
|
||||
expected: 25
|
||||
hidden:
|
||||
- input: { nums: [1], k: 1 }
|
||||
expected: 2
|
||||
- input: { nums: [1, 2, 3], k: 2 }
|
||||
expected: 9
|
||||
- input: { nums: [2, 4, 6], k: 3 }
|
||||
expected: 6
|
||||
- input: { nums: [1000000000], k: 1 }
|
||||
expected: 1
|
||||
- input: { nums: [1, 2, 3, 4, 5], k: 5 }
|
||||
expected: 40
|
||||
- input: { nums: [3, 3, 3], k: 4 }
|
||||
expected: 12
|
||||
|
||||
description: |
|
||||
You are given an integer array `nums` and an integer `k`. Append `k` **unique positive** integers that do **not** appear in `nums` to `nums` such that the resulting total sum is **minimum**.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user