Amazon interview question

Max Product Subarray from leetcode