You are viewing a single comment's thread. Return to all comments →
Not sure how relevant, this passes all tests:
def minimumAbsoluteDifference(arr): diffs = [] arr.sort() for i in range(len(arr)-1): diffs.append(abs(arr[i]-arr[i+1])) return min(diffs)
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 →
Not sure how relevant, this passes all tests: