Ask your own question, for FREE!
Mathematics 9 Online
OpenStudy (sparrow2):

i know that it isnot math but can anyone help with recursion

OpenStudy (sparrow2):

bool subsetSumExists(Set<int> & set, int target) { if (set.isEmpty()) { return target == 0; } else { int element = set.first(); Set<int> rest = set - element; return subsetSumExists(rest, target) || subsetSumExists(rest, target - element); } }

OpenStudy (sparrow2):

@ganeshie8

OpenStudy (sparrow2):

it not easy one

OpenStudy (sparrow2):

i need backtracking

OpenStudy (sparrow2):

@whpalmer4

OpenStudy (sparrow2):

@rebeccaxhawaii

OpenStudy (sparrow2):

@FaiqRaees

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!