Solved Max Product Subarray problem