not time saving but easy to understand
Approach\nfirstly sort the array by selection sorting then apply a easy way to to slove the question \n\n# Complexity\n- Time complexity:\n0(n)\n\n- Space compl
# Approach\nfirstly sort the array by selection sorting then apply a easy way to to slove the question \n\n# Complexity\n- Time complexity:\n0(n)\n\n- Space complexity:\n- 7mb\n\n# Code\n```\nint maxProductDifference(int* nums, int numsSize){\n    int i,j,temp,pro=0;\n    for (i=0;i<numsSize;i++)\n    {\n        for(j=i+1;j<numsSize;j++)\n        {\n            if(nums[i]>nums[j])\n            {\n                 temp = nums[i];\n                nums[i] = nums[j];\n                nums[j] = temp;\n            }\n        }\n    }\n        pro =  pro + (nums[numsSize-2]*nums[numsSize-1]) - (nums[0]*nums[1]);\n    return pro;\n}\n```
['C', 'Python', 'C++']