You are viewing a single comment's thread. Return to all comments →
def minimumAbsoluteDifference(arr): arr.sort() a=arr[0]-arr[1] b=-10000000000 for i in range(2,n): b=max(b,arr[i-2]-a-arr[i]) a=arr[i-2]-a-arr[i] return abs(b)
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Absolute Difference in an Array
You are viewing a single comment's thread. Return to all comments →