just 2 line solution
\nclass Solution {\npublic:\n    int maxProductDifference(vector<int>& nums) {\n       sort(nums.begin(),nums.end());\n        return (nums[nums.size()-1]*nums[
```\nclass Solution {\npublic:\n    int maxProductDifference(vector<int>& nums) {\n       sort(nums.begin(),nums.end());\n        return (nums[nums.size()-1]*nums[nums.size()-2])-(nums[0]*nums[1]);\n    }\n};\n```
['Sorting']