Input: arr= [4,9,8]
Output: 4
Explanation: At index 0, 4 is halved now the array looks like = [2,9,8] and sum of absolute difference is abs(2-abs (9-8)= 8
At index 1, 9 is halved now the array looks like =[4,4,8] and sum of absolute difference is abs(4-abs (4-8)= 4
At index 2 8 is halved now the array looks like = [4,9,4] and sum of absolute difference is abs(4-abs (9-4)= 10
minimum of all absolute sums is 4.
Input: arr= [99,102,1,45,65]
Output: 161
Explanation: At index 0, 99 is halved now the array looks like = [49,102,1,45,65] and sum of absolute difference is 218
At index 1, 102 is halved now the array looks like = [99,51,1,45,65] and sum of absolute difference is 162
At index 2, 1 is halved now the array looks like = [99,102,0,45,65] and sum of absolute difference is 170
At index 3, 45 is halved now the array looks like = [99,102,1,22,65] and sum of absolute difference is 168
At index 4, 65 is halved now the array looks like = [99,102,1,45,32] and sum of absolute difference is 161