Given an array
n real numbers, are the maximum prefix sum and minimum suffix sum (and vice-versa) of A complements?
A[1..n] and its maximum prefix subarray
P[1..i], is its minimum suffix subarray
i+1 = j?
Or stated another way, is
sum(A) = maxPrefixSum(A) + minSuffixSum(A) true?
For an array of only negative numbers, let's assume that
P is empty and
maxPrefixSum(A) = 0. Similar logic applies in the opposite case.