yes.
You can do it simply by dynamic programming.
try all combination.

On Mon, Aug 30, 2010 at 2:41 PM, Maria <[email protected]> wrote:

> Is it possible to find a subset in an array dat produces the specified
> sum 'k' wen the array contains negative numbers?
> For ex:
>  arr[]={1,-2,4,-8,16,-32,64}
>  k=25;
> O/p:subset={1,-8,-32,64}
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<algogeeks%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards,
Rahul Patil

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

Reply via email to