You are given two positive integer arrays nums1 and nums2, both of length n.
The absolute sum difference between two arrays is defined as the sum of nums1[i] nums2[i]i
You can replace at most one element of nums1 with any other element present in nums1 to minimize the absolute sum difference.
Return the minimum absolute sum difference after replacing at most one element. Since the answer may be large, return it modulo
Constraints:
n nums1.length
n nums2.length
n
nums1[i], nums2[i]
You are given two positive integer arrays nums1 and nums2, both of length n.
The absolute sum difference between two arrays is defined as the sum of nums1[i] nums2[i]i
You can replace at most one element of nums1 with any other element present in nums1 to minimize the absolute sum difference.
Return the minimum absolute sum difference after replacing at most one element. Since the answer may be large, return it modulo
Constraints:
n nums1.length
n nums2.length
n
nums1[i], nums2[i]