You are given an integer array nums and an integer k.
For each index i where nums.length, you must update nums[i] to either nums[i] k or nums[i] k.
The score of nums is the difference between the maximum element and the minimum element of nums.
Return the minimum possible score of nums after modifying every element.
Constraints:
nums.length
nums[i]
k
You are given an integer array nums and an integer k.
For each index i where nums.length, you must update nums[i] to either nums[i] k or nums[i] k.
The score of nums is the difference between the maximum element and the minimum element of nums.
Return the minimum possible score of nums after modifying every element.
Constraints:
nums.length
nums[i]
k