Solution for Maximum Product Subarray