[ Python | Java ] 2 lines code
Python:\n\nclass Solution:\n    def maxProductDifference(self, nums: List[int]) -> int:\n        nums=sorted(nums)\n        return ((nums[len(nums)-1]*nums[len(
Python:\n```\nclass Solution:\n    def maxProductDifference(self, nums: List[int]) -> int:\n        nums=sorted(nums)\n        return ((nums[len(nums)-1]*nums[len(nums)-2])-(nums[0]*nums[1]))\n```\nJava:\n```\nclass Solution {\n    public int maxProductDifference(int[] nums) {\n        Arrays.sort(nums);\n        return ((nums[nums.length-1]*nums[nums.length-2])-(nums[0]*nums[1]));    \n    }\n}\n```
[]