feat(content): hidden test cases
This commit is contained in:
@@ -10,6 +10,26 @@ categories:
|
||||
patterns:
|
||||
- backtracking
|
||||
|
||||
function_signature: "def can_partition_k_subsets(nums: list[int], k: int) -> bool:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { nums: [4, 3, 2, 3, 5, 2, 1], k: 4 }
|
||||
expected: true
|
||||
- input: { nums: [1, 2, 3, 4], k: 3 }
|
||||
expected: false
|
||||
hidden:
|
||||
- input: { nums: [1], k: 1 }
|
||||
expected: true
|
||||
- input: { nums: [1, 1, 1, 1], k: 4 }
|
||||
expected: true
|
||||
- input: { nums: [1, 1, 1, 1], k: 2 }
|
||||
expected: true
|
||||
- input: { nums: [2, 2, 2, 2, 3, 4, 5], k: 4 }
|
||||
expected: false
|
||||
- input: { nums: [10, 10, 10, 7, 7, 7, 7, 7, 7, 6, 6, 6], k: 3 }
|
||||
expected: true
|
||||
|
||||
description: |
|
||||
Given an integer array `nums` and an integer `k`, return `true` if it is possible to divide this array into `k` non-empty subsets whose sums are all equal.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user