← All problems

Partition Equal Subset Sum

Medium dynamic programmingknapsack LeetCode ↗
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.

Hints (0/3 revealed)

Log in to reveal hints progressively.

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.