Given an array of integers, return all pairs with the minimum absolute difference. After sorting, the minimum difference must occur between adjacent elements only.
nums = array of integers
all pairs achieving the minimum absolute difference
Example 1:
Input:
nums = [4,2,1,3]
Output:
[[1,2],[2,3],[3,4]]
Explanation:
The minimum absolute difference is 1 and all adjacent sorted pairs achieve it.
Example 2:
Input:
nums = [1,3,6,10,15]
Output:
[[1,3]]
Explanation:
The smallest gap is 2, achieved by pair (1,3).