Practice Maximum Product of Three Numbers
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given an integer array nums, find three numbers whose product is maximum and return the maximum product.
Source: Maximum Product of Three Numbers on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
nums = [1,2,3]
Output
6
# Example 2
Input
nums = [1,2,3,4]
Output
24
# Example 3
Input
nums = [-1,-2,-3]
Output
-6
Constraints
3 <= nums.length <= 10^4
-1000 <= nums[i] <= 1000
Related LeetCode Problems
Practice more problems similar to Maximum Product of Three Numbers.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.