How to find the maximum sum of atleast L consecutive integers given a sequence of N integers.



Hi all,

How can we find the maximum sum of atleast L consecutive integers given
a sequence of N integers.

The brute force approach of forming all possible length sequences at
every index and finding their sum gives an O(N^2) solution which is not
desirable.

Can somebody tell me a better approach for this ?

.