Re: [algogeeks] Sunset sum

2011-06-13 Thread kartik sachan
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

[algogeeks] Sunset sum

2011-06-13 Thread aanchal goyal
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