class Solution { public int maxProduct(int[] nums) { int numsLength = nums.length; int max = nums[0]; int min = nums[0]; int result = nums[0]; for(int idx = 1; idx < numsLength; idx++){ max = Math.max(nums[idx], Math.max(max*nums[idx], min*nums[idx])); min = Math.min(nums[idx], Math.min(max*nums[idx], min*nums[idx])); result = Math.max(result, Math.max(max, min)); } return result; } } Maximum P..