Friday, March 24, 2017

Sum Of Subset of an Array

Program to find sum of subset of a given array and match it with the given sum, if its match with the sum it will print "Yes", if not match with the given sum print "No" if sum of subset is negative number print "error".

Exp :
1
4 8
1
3
5
3

1 is the number of test case, 4 is size of array , 8 is the given sum , 
output : Yes


Sum Of Subset of an Array

0 comments:

Post a Comment