Company: Agoda
Difficulty: medium
2. Closest Numbers Given an array of distinct integers, determine the minimum absolute difference between any two elements. Print all element pairs with that difference in ascending order. Function Description Complete the function closestNumbers in the editor. Parameters: vector<int> numbers : an array of integers Returns: NONE Prints: distinct element pairs that share the minimum absolute difference, displayed in ascending order with each pair separated by one space on a single line Constraints 2 ≤ n ≤ 10 5 -10 9 ≤ numbers[i] ≤ 10 9 Examples Sample Case 0 Input: 4 4 2 1 3 Output: 1 2 2 3 3 4 The minimum absolute difference between any two elements in the array is 1, and there are three such pairs with this difference: (1, 2), (2, 3), and (3, 4). Sample Case 1 Input: 4 4 -2 -1 3 Output: -2 -1 3 4 The minimum absolute difference between any two elements in the array is 1, and there are two such pairs with this difference: (-2, -1) and (3, 4). Code Template void closestNumbers(vec