Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
File
package index
import "sort"
func maxProductDifference(a []int) int { sort.Ints(a) n := len(a) return a[n-1]*a[n-2] - a[0]*a[1]}