Tap here to switch tabs
Problem
Submissions

Problem: Maximum Product of Three Numbers

Maximum Product of Three Numbers asks you to choose three elements from an integer array and return the largest product they can form, including products involving negative values.

Statement

Given an integer array nums, identify three elements whose product is the largest possible, and return that maximum product.

Constraints:

  • 3≤3 \leq nums.length ≤104\leq 10^4

  • −1000≤-1000 \leq nums[i] ≤1000\leq 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Product of Three Numbers

Maximum Product of Three Numbers asks you to choose three elements from an integer array and return the largest product they can form, including products involving negative values.

Statement

Given an integer array nums, identify three elements whose product is the largest possible, and return that maximum product.

Constraints:

  • 3≤3 \leq nums.length ≤104\leq 10^4

  • −1000≤-1000 \leq nums[i] ≤1000\leq 1000