You are viewing a single comment's thread. Return to all comments →
def minimumAbsoluteDifference(arr): minimum = 10e10 Arr = sorted(arr) for i in range(1, len(Arr)): minimum = min(minimum, abs(Arr[i] - Arr[i-1])) if minimum == 0: return 0 return minimum
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 →