Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Largest Sum of Consecutive Integers

by pKai (Priest)
on Aug 31, 2006 at 10:15 UTC ( [id://570573]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # initialisation as before
    
    $cur = $best = $array[$cur_start] if @array;
    ...
        $cur_start = $_ + 1;
      }
    }
    
  2. or download this
    #! /usr/bin/perl -w
    use strict;
    
    ...
    Sum: $best
    Numbers: @array[$best_start..$best_end]
    );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://570573]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found