0

We are given a sorted array containing elements at indices x1,x2,x3,x4,....xn.
We have to find the product ∑(xi * xj * xk) where j>=i and k>=j. For example, in an array {1,2,3,4,5}, the product would involve terms like 1*1*1,1*2*2,1*2*3 and so on.
I have found a solution by brute forcing but I ...