title: Minimize Sum Product Two Arrays Permutations Allowed
signature: def minimizeSumProductTwoArraysPermutationsAllowed(a: List[Int], b: List[Int], n: Int) = {
source_py: def minimize_sum_product_two_arrays_permutations_allowed(A, B, n):
      sorted(A)
      sorted(B)
      result = 0
      for i in range(n):
          result += (A[i] * B[((n - i) - 1)])
      return result
source_cpp: int minimize_sum_product_two_arrays_permutations_allowed(vector<int> A, vector<int> B, int n) {
    sort(A.begin(), A.end());
    sort(B.begin(), B.end());
    int result = 0;
    for ( int i = 0;
    i < n;
    i ++ ) result += ( A [ i ] * B [ n - i - 1 ] );
    return result;
  }