Solution: Partition Equal Subset Sum
Explore a dynamic programming solution to check if an array can be partitioned into two subsets of equal sum. Learn to create and use lookup tables and optimize space complexity while understanding time-space tradeoffs for this classic problem.
Statement
Given a non-empty array of positive integers, determine if the array can be divided into two subsets so that the sum of both subsets is equal.
Constraints:
-
nums.length -
nums[i]