C++ code with Explanation
Explanation:\nFirst we sort the array. Since the largest 3 numbers will make the largest product, we can look for the last 3 digits and multiply them. if the nu
**Explanation:**\n*First we sort the array. Since the largest 3 numbers will make the largest product, we can look for the last 3 digits and multiply them. if the number contains more than 2 negative numbers with maximum magnitide. Then their product will yield maximum value along with the largest positive number. Example -100,-90,1,2,3,4 will have max val of (-100)(-90)(4). We return the maximum of the two as result.* \n```\n int maximumProduct(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        if(nums.size()<3) return 0;\n        int n = nums.size();\n        int m = nums[n-1]*nums[n-2]*nums[n-3];\n        int l = nums[n-1]*nums[1]*nums[0];\n        return max(m,l);\n    }\n```
['C']