feat(content): function signatures + test cases

This commit is contained in:
2025-07-13 19:53:34 +01:00
parent 9e6c6d256f
commit 65a8d525f5
203 changed files with 4526 additions and 0 deletions

View File

@@ -9,6 +9,28 @@ categories:
patterns:
- dynamic-programming
function_signature: "def combination_sum4(nums: list[int], target: int) -> int:"
test_cases:
visible:
- input: { nums: [1, 2, 3], target: 4 }
expected: 7
- input: { nums: [9], target: 3 }
expected: 0
hidden:
- input: { nums: [1], target: 1 }
expected: 1
- input: { nums: [1, 2], target: 3 }
expected: 3
- input: { nums: [2, 3], target: 6 }
expected: 4
- input: { nums: [1, 2, 3], target: 5 }
expected: 13
- input: { nums: [3, 4, 5, 6], target: 10 }
expected: 18
- input: { nums: [5, 10], target: 15 }
expected: 3
description: |
Given an array of **distinct** integers `nums` and a target integer `target`, return *the number of possible combinations that add up to* `target`.