Given an array of positive integers, you may repeatedly perform either operation any number of times on any element: if it is even, divide it by 2; if it is odd, multiply it by 2. The deviation is the difference between the maximum and minimum elements. Return the minimum possible deviation. Input: an array of positive integers.
Input: An array of positive integers.
Output: Integer — the minimum deviation.
Input: [1,2,3,4]
Output: 1
Explanation: Transform to bring max and min within 1.Input: [4,1,5,20,3]
Output: 3
Explanation: Minimum achievable spread.Input: [2,10,8]
Output: 3
Explanation: Best deviation is 3.1<=n<=10^51<=value<=10^9