Company: Hackerearth_6april
Difficulty: medium
Mark has an array of N elements of positive integers. He is interested in finding out the maximum absolute difference between any 2 elements in the array. But he wants to minimize this maximum absolute difference. He can perform the [unclear] two types of operation on the array ele[unclear] numbe[unclear]es, If the element E is even then he can replace it by E/2, If the element E is odd then he can replace it by 2E. Can you help him minimize this maximum absolute difference? Input Format: The first line consists of a single integer T , the number of test cases. Each test case [unclear] of 2 lines 1st line has an integer N [unclear]ber of ele[unclear]nts in the array. Next lines have 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 [unclear] each valid i It is guaranteed that summation of N over all test cases doesn't