Sum of products over all subarrays
An online assessment with two problems.
- A simplified text justification: lay words out into lines of a fixed width.
- Given an array, return the sum, over every contiguous subarray, of the product of its elements. Do it in one pass by keeping the sum of products of subarrays that end at the current index.
No answer yet. Write the first one; the best answer gets endorsed.
