For negative numbers, ... why can't we log the absolute value and then
negate it of course?

We should also assume if the data contains zeroes, though.  This probably
has to be handled differently.

On 4/26/07, Balachander <[EMAIL PROTECTED]> wrote:
>
>
> Hi
>
> Think thats not, possible
>
> Is ur soln : this way
>
> Arr : a[1 ...n]
> New Arr = newRR[ loga[i] .log[an] ]
>
> and Finding the max sum..
> If so it ca be done as OLog is not defined for negative numbers ..
>
>
> Bala
>
> On Apr 26, 9:24 am, Arunachalam <[EMAIL PROTECTED]> wrote:
> > Multiplication can be converted to addition by adding the log (ln).
> >
> > Then you need to find maximum sub array which sums to maximum.
> >
> > regards
> > Arunachalam.
> >
> > On 4/25/07, Bootlegger <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > > We've all seen the maximum sum contiguous subarray problem, but heres
> > > a new take on it:
> >
> > > Say we are given an array A[1 to n] of n inte-gers (positive and
> > > negative), we need to find the maximum product found in any contiguous
> > > sub-array.
> >
> > > I've had a crack at this and im struggling apparently it can be done
> > > in O(n) time.
> >
> > > Anyone any idea for the pesudo code here?
> >
> > --
> > ===================================
> > want to know more about me
> > http"//ww.livejournal.com/users/arunachalam
>
>
> >
>


-- 
Fear of the LORD is the beginning of knowledge (Proverbs 1:7)

--~--~---------~--~----~------------~-------~--~----~
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