Partition Equal Subset Sum
Given an integer array nums, return true if you can partition the array into two subsets such that the sum of the elements in both subsets is equal.

30:00

Partition Equal Subset Sum
medium
Topics
Companies

Given an integer array nums, return true if you can partition the array into two subsets such that the sum of the elements in both subsets is equal.

Example 1:
Input: [1,5,11,5]
Output: true
Constraints:
  • 1nums.length2001 \leq \text{nums.length} \leq 200

  • 1nums[i]1001 \leq \text{nums}[i] \leq 100

Input
arr =[1,5,11,5]

Target sum: 11

01234567891011dpTFFFFFFFFFFF
Variables
VariableValue
total22
target11
DepthFunction Call
Stack empty
0/6