Company: Hackerearth_1nov
Difficulty: medium
Array-Difference Problem Description Priya has an array of N positive integers and wants to know the smallest possible value for the maximum absolute difference between any two elements of the array. She may repeatedly apply either of these two operations to any element, as many times as she likes: If an element E is even, she may replace it with E/2. If an element E is odd, she may replace it with 2E. Help her find the smallest achievable value of that maximum absolute difference. Input Format The first line consists of a single integer T , the number of test cases. Each test case consists of 2 lines. 1st line has an integer N , the number of elements in the array. Next line has N space separated integers, denoting array elements. Output Format For each test case, output in a separate line, the answer to the given question. Constraints 1 <= T <= 500 2 <= N <= 50000 1 <= A[i] <= 10^9 for each valid i It is guaranteed that summation of N over all test cases doesn't exc