You are viewing a single comment's thread. Return to all comments →
def minimumAbsoluteDifference(arr):
n_arr = [] arr.sort() for i in range(len(arr) - 1): c = arr[i] n = arr[i + 1] d = abs(c - n) n_arr.append(d) return min(n_arr)
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 →
def minimumAbsoluteDifference(arr):