Max product is comprised of **EITHER** *the two smallest negative values and the largest positive value*, **OR** *the three largest positive values*. Sort the array and return the max of these two combinations.

```
class Solution {
public:
int maximumProduct(vector<int>& nums) {
int size=(int)nums.size();
sort(nums.begin(), nums.end());
return max ( nums[0]*nums[1]*nums[size-1], nums[size-3]*nums[size-2]*nums[size-1] );
}
};
```