Tap here to switch tabs
Problem
Submissions

Problem: Minimize Product Sum of Two Arrays

Minimize Product Sum of Two Arrays gives you two equal-length integer arrays and asks for the smallest total of elementwise products after reordering one array.

Statement

The product sum of two integer arrays nums1 and nums2 of equal length n is defined as the sum of nums1[i] $ imes$ nums2[i] for all 0≤0 \leq i << n.

Given two integer arrays nums1 and nums2 of length n, return the minimum product sum achievable after permuting the elements of nums1.

Constraints:

  • n ==== nums1.length ==== nums2.length

  • 1≤1 \leq n ≤105\leq 10^5

  • 1≤1 \leq nums1[i], nums2[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimize Product Sum of Two Arrays

Minimize Product Sum of Two Arrays gives you two equal-length integer arrays and asks for the smallest total of elementwise products after reordering one array.

Statement

The product sum of two integer arrays nums1 and nums2 of equal length n is defined as the sum of nums1[i] $ imes$ nums2[i] for all 0≤0 \leq i << n.

Given two integer arrays nums1 and nums2 of length n, return the minimum product sum achievable after permuting the elements of nums1.

Constraints:

  • n ==== nums1.length ==== nums2.length

  • 1≤1 \leq n ≤105\leq 10^5

  • 1≤1 \leq nums1[i], nums2[i] ≤100\leq 100