Solution: Partition Equal Subset Sum
Explore how to apply dynamic programming to solve the Partition Equal Subset Sum problem. Understand the naive recursion approach and improve it with a bottom-up tabulation method. Learn to build a lookup table that evaluates subproblems to efficiently check for equal sum subsets, and discover space optimization to reduce memory usage.
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]