c++ || max product of 3 no.|| Basic || n* logn
Time complexity= n*log(n)\nn=size of given vector\n\nclass Solution {\npublic:\n    int maximumProduct(vector<int>& nums) {\n        int ans=INT_MIN,n=nums.size
Time complexity= n*log(n)\nn=size of given vector\n```\nclass Solution {\npublic:\n    int maximumProduct(vector<int>& nums) {\n        int ans=INT_MIN,n=nums.size();\n        sort(nums.begin(),nums.end());\n        \n        int x=nums[n-3];\n        int y=nums[n-2];\n        int z=nums[n-1];\n         int a=nums[0];\n        int b=nums[1];\n      \n        \n        ans=max(ans,x*y*z);         // when whole array is -ve or +ve\n         ans=max(ans,a*b*z);\n        \n        return ans;\n        \n    }\n};\n```
['C', 'C++']