628_Maximum Product of Three Numbers
Last updated
Last updated
[easy] [array, math]
Given an integer array, find three numbers whose product is maximum and output the maximum product.
Example 1:
Example 2:
Idea:
The maximum can be achieved by multiplying the largest 3 positive values or multiplying the largest 1 positive values and the smallest 2 negative values.
Time Complexity:
Space Complexity: