Given an integer array nums of even length n and an integer limit.
In nums with any integer value between limit, inclusive.
The array nums is complementary if nums[i] nums[n - 1 - i] is equal to the same constant sum for every index i such that i n.
Return the minimum number of moves required to make nums complementary.
Constraints:
n nums.length
n
nums[i] limit
n is even.
Given an integer array nums of even length n and an integer limit.
In nums with any integer value between limit, inclusive.
The array nums is complementary if nums[i] nums[n - 1 - i] is equal to the same constant sum for every index i such that i n.
Return the minimum number of moves required to make nums complementary.
Constraints:
n nums.length
n
nums[i] limit
n is even.