Sort and then take subtraction of product of last 2 and first 2 numbers
Approach\nsort the list and then take subtraction of product of first 2 and last 2 numbers\n\n# Complexity\n- Time complexity:\n15 ms, Beats: 81.48%\n\n- Space 
# Approach\nsort the list and then take subtraction of product of first 2 and last 2 numbers\n\n# Complexity\n- Time complexity:\n15 ms, Beats: 81.48%\n\n- Space complexity:\n6.25 mb, beats: 76.54%\n\n# Code\n```golang []\nfunc maxProductDifference(nums []int) int {\n\tsort.Ints(nums)\n\n\tleft := nums[0] * nums[1]\n\trigth := nums[len(nums)-1] * nums[len(nums)-2]\n\n\tres := rigth - left\n\n\treturn res\n}\n\n```
['Go']