You are given an integer array nums
.
nums
is the minimum absolute difference between any two integers.nums
is the maximum absolute difference between any two integers.nums
is the sum of the high and low scores.Return the minimum score after changing two elements of nums
.
Example 1:
Input: nums = [1,4,7,8,5]
Output: 3
Explanation:
nums[0]
and nums[1]
to be 6 so that nums
becomes [6,6,7,8,5].Example 2:
Input: nums = [1,4,3]
Output: 0
Explanation:
nums[1]
and nums[2]
to 1 so that nums
becomes [1,1,1].
Constraints:
3 <= nums.length <= 105
1 <= nums[i] <= 109