LoC - Coding Interview A
-
Difficulty: Easy
Time Limit: 10 minutesFind a maximum sum of a compact subsequence of array elements.
A non-empty array A consisting of N integers is given. A pair of integers (P, Q), such that
0 ≤ P ≤ Q < N
, is called a slice of array A. The sum of a slice (P, Q) is the total ofA[P] + A[P+1] + ... + A[Q]
.