New York Life Interview Question

They asked to find the maximum product subarray question from leetcode.