Given an array arr[] of size N, check if it can be partitioned into two parts such that the sum of elements in both parts is the same.
- Time : O(n * sum)
- Space : O(sum)
1 | class Solution { |
Given an array arr[] of size N, check if it can be partitioned into two parts such that the sum of elements in both parts is the same.
1 | class Solution { |