Please enter your email address or userHandle.
Given an unsorted array, find the minimum difference between any pair in given array.
The first line of input contains an integer T denoting the number of test cases.
The first line of each test case is N, the size of array. Second line of the test case is the Array.
Print the minimum difference between any two pairs.
1 <= T <= 30
1 < N <= 100
1 <= arr[i] <= 100000
2 4 5 7 9
87 32 99 75 56 43 21 10 68 49
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Login to access your submissions.
Please choose 'ReadOnlyMode' if you needn't to 'Edit' the problem e.g. viewing OJ's solution, TestCase Files (TCFs), TimeLimit etc.