Partition Equal Subset Sum

00:00
MediumDynamic ProgrammingKnapsack
AmazonFacebook

Determine if you can partition array into two subsets with equal sum.

Examples

Input → [1,5,11,5]
Output → True
Note: [1,5,5] and [11]
Input → [1,2,3,5]
Output → False
Input → [1,1]
Output → True