#K53257. Minimum Absolute Difference
Minimum Absolute Difference
Minimum Absolute Difference
You are given an array of n integers. Your task is to compute the minimum absolute difference between any two elements in the array. The absolute difference between two numbers \(a\) and \(b\) is defined as \(|a - b|\).
Hint: Sorting the array may simplify the process, as the smallest difference will be among adjacent elements after sorting.
inputFormat
The first line contains a single integer \(n\) \((n \geq 2)\) representing the number of elements in the array. The second line contains \(n\) space-separated integers.
outputFormat
Output a single integer denoting the minimum absolute difference between any two elements in the array.
## sample4
3 8 15 17
2