feat(content): more test cases
This commit is contained in:
@@ -9,6 +9,24 @@ categories:
|
||||
patterns:
|
||||
- dynamic-programming
|
||||
|
||||
function_signature: "def can_partition(nums: list[int]) -> bool:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { nums: [1, 5, 11, 5] }
|
||||
expected: true
|
||||
- input: { nums: [1, 2, 3, 5] }
|
||||
expected: false
|
||||
- input: { nums: [1, 2, 5] }
|
||||
expected: false
|
||||
hidden:
|
||||
- input: { nums: [1, 1] }
|
||||
expected: true
|
||||
- input: { nums: [2, 2, 1, 1] }
|
||||
expected: true
|
||||
- input: { nums: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 99, 97] }
|
||||
expected: false
|
||||
|
||||
description: |
|
||||
Given an integer array `nums`, return `true` *if you can partition the array into two subsets such that the sum of the elements in both subsets is equal* or `false` *otherwise*.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user