These assignments are from Cormen/Leiserson/Rivest.
Second edition: Page 930, 32.4-1. First edition: Page 875 34.4-1. The text uses the Greek letter pi as the name of the failure function.
Second edition: Page 931, 32-1(a). First edition: Page 883 34-1(a).
You are given an array x of n real numbers, and an integer m. You must find a value i where 0 <= i < n-m such that the sum x[i]+x[i+1]+...+x[i+m] is as large as possible. Describe an algorithm that solves this problem in time O(n). Assume that arithmetic (addition, subtraction, multiplication and division) on real numbers takes constant time per operation.