You are given an integer array nums and an integer k.
In one operation, you can choose an integer i and update nums[i] to nums[i] + x. You can apply this operation at most once for each element.
The score of the array nums is defined as the difference between the maximum element and the minimum element in nums.
Return the minimum possible score of nums after modifying each element.
Constraints:
nums.length
nums[i]
k
You are given an integer array nums and an integer k.
In one operation, you can choose an integer i and update nums[i] to nums[i] + x. You can apply this operation at most once for each element.
The score of the array nums is defined as the difference between the maximum element and the minimum element in nums.
Return the minimum possible score of nums after modifying each element.
Constraints:
nums.length
nums[i]
k