Sum of products over all subarrays

0
Remix

An online assessment with two problems.

  1. A simplified text justification: lay words out into lines of a fixed width.
  2. 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.
PikaOnline assessmentLast asked Aug 2025
No answer yet. Write the first one; the best answer gets endorsed.