C++ Solution with explanation
Either product of 3 biggest positive values will be maxProduct or if there are negative values then pick the 2 biggest negative values and multiply with biggest
Either product of 3 biggest positive values will be maxProduct or if there are negative values then pick the 2 biggest negative values and multiply with biggest positive value\n\nSort the Array and compare above mentioned products\n\n\n    int maximumProduct(vector<int>& nums) {\n        sort(nums.begin(), nums.end());\n        int n = nums.size();\n        int temp1 = nums[n-1]*nums[n-2]*nums[n-3];\n        int temp2 = nums[0]*nums[1]*nums[n-1];\n        return temp1>temp2?temp1:temp2;\n    }
[]