#K77792. Equal Partition Subset Sum
Equal Partition Subset Sum
Equal Partition Subset Sum
Given a list of integers, determine whether it is possible to partition the list into two subsets such that the sum of the elements in both subsets is equal. In other words, find if there exists a subset (S) of the given numbers such that (\sum_{x \in S} x = \sum_{x \in nums \setminus S} x). This problem can be solved using dynamic programming.
inputFormat
The input consists of two lines. The first line contains an integer (n), the number of elements. The second line contains (n) space-separated integers representing the elements of the array.
outputFormat
Output a single line containing either (True) if the list can be partitioned into two subsets with equal sum, or (False) otherwise.## sample
4
1 5 11 5
True