maximum product subarray submitted

O(n) time complexity