Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

The function is a product of matrices ,like: F(k) = [k, k+1...n-2,n-1,0,....k-1] * A[n] F(k+1) = [k+1,k+2...n-1,0, 1,.....k] * A[n] so F(k+1) - F(k) = [1,1,1...-n+1,1,1,1] * A[n] = sum(A[n]) - n * A[n - 1 - k];

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.