You are given an array of positive integers nums.
In one operation, you can increment or decrement any integer by
An integer is considered a binary palindrome if its binary representation without leading zeros reads the same forward and backward.
Return an integer array ans of the same length as nums, where ans[i] represents the minimum number of operations needed to transform nums[i] into a binary palindrome.
Constraints:
nums.length
nums[i]
You are given an array of positive integers nums.
In one operation, you can increment or decrement any integer by
An integer is considered a binary palindrome if its binary representation without leading zeros reads the same forward and backward.
Return an integer array ans of the same length as nums, where ans[i] represents the minimum number of operations needed to transform nums[i] into a binary palindrome.
Constraints:
nums.length
nums[i]