π One-stop destination for all your technical interview Preparation π
bool canPartition(vector<int> &arr, int n)
{
int sum = 0;
for(int i = 0; i< n; i++){
sum+=arr[i];
}
if(sum%2==1) return false;
return subsetSumToK(n,sum/2,arr);
}