Easy C++ solution
Intuition\nSorting is a key for solving the current problem. \n\n# Approach\n Describe your approach to solving the problem. \n - Sort the array\n - We can see 
# Intuition\nSorting is a key for solving the current problem. \n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n - Sort the array\n - We can see that the size of array is always more than 3\n - It means that we can just get last two elements of the array as maximum product and the first two elements as minimum possible product\n \n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n The dominant factor in the time complexity is the sorting operation, which has a time complexity of O(n log n), where n is the size of the input vector.\n The subsequent operations involving array indexing and arithmetic have constant time complexity O(1).\nTherefore, the overall time complexity of the `maxProductDifference` method is `O(n log n)`.\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nThe space complexity is primarily determined by the sorting algorithm. Since the sorting is performed in-place (using the sort function), the space complexity is `O(1)` for the sorting operation.\nOther variables used in the method (such as the size variable) have constant space complexity `O(1)`.\nTherefore, the overall space complexity of the `maxProductDifference` method is `O(1)`.\n# Code\n```\nclass Solution {\npublic:\n    int maxProductDifference(vector<int>& nums) {\n        sort(begin(nums),end(nums));\n        int size = nums.size();\n        return (nums[size-1]*nums[size-2]) - (nums[1]*nums[0]);\n    }\n};\n```
['C++']