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 <= 1051 <= nums[i] <= 109Solutions for this problem are being prepared.
Try solving it yourselfMinimum Difference Between Highest and Lowest of K Scores - Leetcode Weekly Contest - 1984 Python • NeetCode • 19,321 views views
Watch 9 more video solutions →Practice Minimum Score by Changing Two Elements with our built-in code editor and test cases.
Practice on FleetCodePractice this problem
Open in Editor