DP for O(n) because brute force is O(n^2) We maintain an ongoing tally of the largest product thus fas as we iterate. This automatically encapsulates the concept of subarrays because if the product x ...
that has the largest product, and return the product. The test cases are generated so that the answer will fit in a 32-bit integer.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results