Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2018-08-14 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (152 votes). Check out past polls.

    Notices?