The stupid question is the question not asked | |
PerlMonks |
Re: Largest Sum of Consecutive Integersby wojtyk (Friar) |
on Aug 30, 2006 at 19:10 UTC ( [id://570456]=note: print w/replies, xml ) | Need Help?? |
Are you sure that's not O(n*log(n))? It looks like your basic divide-and-conquer Speaking of which, that's actually how I envisioned solving this, only utilizing medians (aka, divide list, find median, then recompute new list indexes based on the median values)
In Section
Seekers of Perl Wisdom
|
|