1200. Minimum Absolute Difference
https://leetcode.com/problems/minimum-absolute-difference
Description
Given an array of distinct integers arr
, find all pairs of elements with the minimum absolute difference of any two elements.
Return a list of pairs in ascending order(with respect to pairs), each pair [a, b]
follows
a, b
are fromarr
a < b
b - a
equals to the minimum absolute difference of any two elements inarr
Example 1:
Example 2:
Example 3:
Constraints:
2 <= arr.length <= 10^5
-10^6 <= arr[i] <= 10^6
ac
Last updated