Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Largest Sum of Consecutive Integers

by blokhead (Monsignor)
on Aug 30, 2006 at 18:53 UTC ( #570453=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    lbest(i,i) = rbest(i,i) = best(i,i) = max{ 0, array[i] }
    
    ...
                      lbest(i,k) }, where k = int((j+i)/2)
    rbest(i,j) = max{ rbest(i,k) + total(k+1,j),
                      rbest(k+1,j) }, where k = int((j+i)/2)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://570453]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2018-01-17 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (196 votes). Check out past polls.

    Notices?