C++ solution using sorting
class Solution {\npublic:\n    int maxProductDifference(vector& nums) {\n        sort(nums.begin(),nums.end());\n        int diff=nums[nums.size()-1]nums[nums.s
class Solution {\npublic:\n    int maxProductDifference(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        int diff=nums[nums.size()-1]*nums[nums.size()-2];\n        diff-=nums[0]*nums[1];\n        return diff;\n    }\n};
['C', 'Sorting']