You are viewing a single comment's thread. Return to all comments →
Yeah, it was pretty easy after reading your comment.
n,a = input(),sorted(map(int, input().split())) print(min(abs(x-y) for x,y in zip(a,a[1:])))
Minimum Absolute Difference in an Array
You are viewing a single comment's thread. Return to all comments →
Yeah, it was pretty easy after reading your comment.