You are given an integer array nums and an integer k.
In a single operation, you can choose any element in nums and increment or decrement its value by
Return the minimum number of operations required to make all elements equal in at least one contiguous subarray of length k.
Constraints:
nums.length
nums[i]
k nums.length
You are given an integer array nums and an integer k.
In a single operation, you can choose any element in nums and increment or decrement its value by
Return the minimum number of operations required to make all elements equal in at least one contiguous subarray of length k.
Constraints:
nums.length
nums[i]
k nums.length