Maximum Product of Two Elements in an Array
Given the array of integers nums
, you will choose two different indices i
and j
of that array. Return the maximum value of (nums[i]-1)*(nums[j]-1)
.
Example 1:
Example 2:
Example 3:
Constraints:
2 <= nums.length <= 500
1 <= nums[i] <= 10^3
PreviousMaximum Area of a Piece of Cake After Horizontal and Vertical CutsNextMaximum Sum Circular Subarray
Last updated