标签:array vector sig tar product ica 两种 number script
Given an integer array, find three numbers whose product is maximum and output the maximum product.
Example 1:
Input: [1,2,3] Output: 6
Example 2:
Input: [1,2,3,4] Output: 24
Note:
解题思路:
排序后两种情况,3个都是正数最大,2个是负数最小,一个是正数最大比大小。
628. Maximum Product of Three Numbers
标签:array vector sig tar product ica 两种 number script
原文地址:https://www.cnblogs.com/liangyc/p/8847647.html