← All problems
Partition Equal Subset Sum
Given an integer array, determine whether it can be partitioned into two subsets with equal sum. Reduce this to a known knapsack-style decision problem.
Complexity
Time O(n * sum), Space O(sum)
Common pitfalls
- Forward iteration (unbounded reuse bug)
- Skipping the even-total check
Your solution
Log in to save your code and track progress.