@All

The same algo will work for both +ve and -ve nos.. no need for
modification..

For ex-
Say the sum is 4 and the set is { 1, 2, 3, -2 }

Now if u include -2 as part of ur solution then for the rest 3
elements the sum would be 4-(-2) = 6, which is correct...


On Jan 9, 2:20 pm, Siddhartha <thefourrup...@gmail.com> wrote:
> yup...that was what i was thinking... i guess for negative nos, we can
> define Wmax= sum of modulus of weights,and then the  same algo works...

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to