max double slice sum

A collection of 1 post

Max Double Slice Sum

Problem A non-empty array A consisting of N integers is given. A triplet (X, Y, Z), such that 0 ≤ X < Y < Z < N, is called a double slice. The sum of double slice (X, Y, Z) is the total of AX + 1 + AX + 2 + … + AY − 1 + AY + 1 + AY + 2 + … + AZ − 1. For example, array A such that: contains the…