Given a non-empty array A[ ] containing only positive integers, Write a program to find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.

Example 1

Input: A[] = [1, 6, 11, 6] 
Output: true  
Explanation: The array can be partitioned as [6, 6] and [1, 11].  

Example 2

Input: A[] = [2, 6, 7]
Output: false
Explanation: The array cannot be partitioned into equal sum sets.