Partition Equal Subset Sum
Medium
Dynamic Programming
Array
Dynamic Programming
Can array be partitioned into two subsets with equal sum?
Constraints
1 ≤ nums.length ≤ 200
Examples
Example 1:
Input: 1 5 11 5
Output: true
Explanation: [1,5,5] and [11]
Example 2:
Input: 1 2 3 5
Output: false
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console