You are given an integer array nums of even length n and an integer k.
In one operation, you can choose any index i satisfying i n and replace nums[i] with any integer in the range
Your goal is to choose an integer X such that for all indices i where i n nums[i] nums[n - i - 1]
Return the minimum number of operations required to make the difference equal for all such pairs.
Constraints:
n nums.length
n is even.
nums[i] k
You are given an integer array nums of even length n and an integer k.
In one operation, you can choose any index i satisfying i n and replace nums[i] with any integer in the range
Your goal is to choose an integer X such that for all indices i where i n nums[i] nums[n - i - 1]
Return the minimum number of operations required to make the difference equal for all such pairs.
Constraints:
n nums.length
n is even.
nums[i] k