You are viewing a single comment's thread. Return to all comments →
Python3 1 liner
return min(map(lambda p: p[1] - p[0], itertools.pairwise(sorted(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 →
Python3 1 liner