You are given an array nums consisting of
You can perform two types of operations on any element in the array any number of times:
If the element is even, divide it by
If the element is odd, multiply it by
The deviation of the array is defined as the maximum difference between any two elements in the array.
Return the minimum deviation you can achieve after applying any number of operations.
Constraints:
n == nums.length
n
nums[i]
You are given an array nums consisting of
You can perform two types of operations on any element in the array any number of times:
If the element is even, divide it by
If the element is odd, multiply it by
The deviation of the array is defined as the maximum difference between any two elements in the array.
Return the minimum deviation you can achieve after applying any number of operations.
Constraints:
n == nums.length
n
nums[i]