Function to find the minimum absolute value of ( K - arr [ i ] ) for each possible value of K over the range [ 0 , N - 1 ] |
function minimumDistance ( arr , N ) { let ind = 0 ; let prev = arr [ ind ] ; let s = arr . length ;