Maximum Subarray Min Product Leetcode Javascript Practice