You are given two integer arrays nums1 and nums2.
From nums1, exactly x is added to every remaining element. After these operations, the modified nums1 becomes equal to nums2, meaning both arrays contain the same values with identical frequencies.
Return the minimum possible integer x that satisfies this condition.
Constraints:
nums1.length
nums2.length nums1.length
nums1[i], nums2[i]
The test cases are generated such that at least one integer x exists that allows nums1 to become equal to nums2 after removing x to each remaining element.
You are given two integer arrays nums1 and nums2.
From nums1, exactly x is added to every remaining element. After these operations, the modified nums1 becomes equal to nums2, meaning both arrays contain the same values with identical frequencies.
Return the minimum possible integer x that satisfies this condition.
Constraints:
nums1.length
nums2.length nums1.length
nums1[i], nums2[i]
The test cases are generated such that at least one integer x exists that allows nums1 to become equal to nums2 after removing x to each remaining element.