Tag: maximumproductsubarray
-
Data Structures and Algorithms in Java – Arrays – Maximum Product Subarray
Problem: Given an array of integers, find a continuous sub array in this array such that the product of its numbers is maximum among all sub arrays. Just return the value of the product. Input: Consider the input: input = [1,-2,-3,0,7,-8,-2] there are many possible continuous sub arrays like [1], [1,-2], [1,-2,-3] … [-3,0],[-3,0,7,-8] etc..…