You are given an integer array nums and an integer k.
In one operation, you can choose any element in nums and increase or decrease it by
The array nums is considered modulo alternating if there exist two distinct integers
nums[i] % k is equal to
nums[i] % k is equal to
Return the minimum number of operations required to make nums modulo alternating.
Constraints:
nums.length
nums[i]
k
You are given an integer array nums and an integer k.
In one operation, you can choose any element in nums and increase or decrease it by
The array nums is considered modulo alternating if there exist two distinct integers
nums[i] % k is equal to
nums[i] % k is equal to
Return the minimum number of operations required to make nums modulo alternating.
Constraints:
nums.length
nums[i]
k