Maximum Product of Three Numbers

Given an integer array, find three numbers whose product is maximum and return that maximum product.

Constraints

  • 3 <= nums.length <= 10^4
  • -1000 <= nums[i] <= 1000
Saving… · 2 lines
class Solution:
def maximumProductOfThreeNumbers(self, nums: List[int]) -> int:
Console

Click Run to execute sample tests.