S
All challenges
Practice
Home
Blog
Practice
Examples
Feedback
Partition Equal Subset Sum
00:00
Start
00:00
Sign in
Problem
Hints
3
Solution
History
Medium
Dynamic Programming
Knapsack
Amazon
Facebook
Determine if you can partition array into two subsets with equal sum.
Examples
Example 1
Input →
[1,5,11,5]
Output →
True
Note:
[1,5,5] and [11]
Example 2
Input →
[1,2,3,5]
Output →
False
Example 3
Input →
[1,1]
Output →
True
JavaScript
Python
Java (Coming soon)
C (Coming soon)
C++ (Coming soon)
Reset
Run
Submit
Cases
Results