1818. Minimum Absolute Sum Difference
Description
**Input:** nums1 = [1,7,5], nums2 = [2,3,5]
**Output:** 3
**Explanation:** There are two possible optimal solutions:
- Replace the second element with the first: [1,**7**,5] => [1,**1**,5], or
- Replace the second element with the third: [1,**7**,5] => [1,**5**,5].
Both will yield an absolute sum difference of |1-2| + (|1-3| or |5-3|) + |5-5| = 3.ac
Last updated