Aye its not the same,

I suspect the answer will have something to do with verifying the
number of negative numbers in the subarray, seen as a even number of
negative numbers will produce a positive product and an odd number of
negatives will produce a negative product.

Bootlegger

On 25 Apr, 13:51, "Nilesh Agrawal" <[EMAIL PROTECTED]> wrote:
> > I think the problem is same as maximum sum..since product is max. if sum
> > is max. only thing we have to verify is that we should get even number of
> > negative numbers in our product..
>
> Its not the same.
> Consider the sequence:
>
> 50, -25, -25
>
> Max. Sum subarray : 50
> Max. Product subarray: 50, -25, -25
>
> Nilesh
>
> --
> And ye shall know the truth (source) and the truth shall set you free.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to