1874. Minimize Product Sum of Two Arrays
Description
**Input:** nums1 = [5,3,4,2], nums2 = [4,2,2,5]
**Output:** 40
**Explanation:** We can rearrange nums1 to become [3,5,4,2]. The product sum of [3,5,4,2] and [4,2,2,5] is 3*4 + 5*2 + 4*2 + 2*5 = 40.
**Input:** nums1 = [2,1,4,5,7], nums2 = [3,2,4,8,6]
**Output:** 65
**Explanation:** We can rearrange nums1 to become [5,7,4,1,2]. The product sum of [5,7,4,1,2] and [3,2,4,8,6] is 5*3 + 7*2 + 4*4 + 1*8 + 2*6 = 65.ac
Last updated