Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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?
hippo looks sideways at LiposuctionAnnCure
[Veltro]: I don't understand. I keep getting "your connection is not secure" on https://perlmonks. org. The behaviour is totally random. Then it is insecure and then it is secure again...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2018-05-23 11:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?