#K1086. Minimized Absolute Difference
Minimized Absolute Difference
Minimized Absolute Difference
You are given several test cases. In each test case, you are provided with an integer N representing the number of gates and a list of N integers denoting the power levels of these gates.
Your task is to determine the minimized absolute difference between any two gate power levels after performing an optimal operation. In this problem, the operation details have been abstracted away so that the answer is simply the minimum absolute difference between any two numbers in the array.
Formally, given a sorted array a1, a2, \dots, aN, you are to compute:
$$\min_{1 \le i < N} \left|a_{i+1} - a_i\right|.$$
It is guaranteed that each test case has at least two gates.
inputFormat
The first line of input contains an integer T denoting the number of test cases.
For each test case:
- The first line contains an integer N, the number of gates.
- The second line contains N space-separated integers representing the power levels of the gates.
Input is provided via standard input (stdin).
outputFormat
For each test case, output a single line containing the minimized absolute difference between any two successive elements when the list is sorted in non-decreasing order. Output is written to standard output (stdout).
## sample2
4
1 3 2 4
5
-3 -1 4 0 2
1
1
</p>