u think first sort the array then find the sum of +ve no
and check with sum K if it is less then continueelse if equal then break
and if more start subtracting from negative no present in
arrayin all the process record the elements whom u are
adding or subtracti
How to solve the subset sum problem if the array contains -ive elements
also??
For example, given an array containing +,ve and -ive elements, and a sum K,
how can we find whether a subset sums upto K in array?
--
Regards,*
Aanchal Goyal*.
--
You received this message because you are subscribed t