Meara covers streaming service news for CNET. She graduated from the University of Texas at Austin with a degree in journalism. When she's not writing, she likes to dote over her cat, sip black coffee ...
Let me try to give some explanations for this solution. Case 1: If there's no zero in the array Then the subarray with maximum product must start with the first element or end with the last element.
Intuition : We can get max product by either multiplying two large positive numbers or by multiplying two small negative numbers -> so we need to store the maximum as well as minimum ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results