You are given two integer arrays nums1 and nums2 of equal length.
Every element in nums1 is increased by an integer x such that nums1 becomes equal to nums2, meaning both arrays contain the exact same elements after sorting.
Return the integer x.
Constraints:
nums1.length nums2.length
nums1[i], nums2[i]
The test cases are generated such that there exists an integer x where nums1 can become equal to nums2 after adding x to each element of nums1.
You are given two integer arrays nums1 and nums2 of equal length.
Every element in nums1 is increased by an integer x such that nums1 becomes equal to nums2, meaning both arrays contain the exact same elements after sorting.
Return the integer x.
Constraints:
nums1.length nums2.length
nums1[i], nums2[i]
The test cases are generated such that there exists an integer x where nums1 can become equal to nums2 after adding x to each element of nums1.