For this Question: You are given an array of integers. Consider absolute difference between all the pairs of the the elements. You need to find Kth smallest absolute difference. If the size of the array is N then value of K will be less than N and more than or equal to 1.The first line of input contains number of test cases T. 
The first line of each test case contains a two integers N and K denoting the number of elements in the array A and difference you need to output. The second line of each test case contains N space separated integers denoting the elements of the array A

Constraints:
1<= T <= 10
2 <= N <= 100000
1 <= K < N < 100000
0 <= A[i] <= 100000For each test case, output Kth smallest absolute difference.Input :
1
6 2
1 3 4 1 3 8

Output :
0

Explanation :
Test case 1: First smallest difference is 0, between the pair (1, 1) and second smallest absolute difference difference is also 0 between the pairs (3, 3)., I have written this Solution Code: import java.util.*;
import java.io.*;
import java.lang.*;

class Main{
    public static void main(String[] args)throws IOException {

        BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(read.readLine().trim());

        while (t-- > 0) {
          
            String str[] = read.readLine().trim().split(" ");

            int n = Integer.parseInt(str[0]);
            int k = Integer.parseInt(str[1]);

            int arr[] = new int[n];
           str = read.readLine().trim().split(" ");
            for (int i = 0; i < n; i++) 
                  arr[i] = Integer.parseInt(str[i]);

            System.out.println(Math.abs(small(arr, k)));
        }
    }

    public static int small(int arr[], int k) {
        Arrays.sort(arr);
        int l = 0, r = arr[arr.length - 1] - arr[0];
        while (r > l) {
            int mid = l + (r - l) / 2;
            if (count(arr, mid) < k) {
                l = mid + 1;
            } else {
                r = mid;
            }
        }
        return r;
    }

    public static int count(int arr[], int mid) {
        int ans = 0, j = 0;
        for (int i = 1; i < arr.length; ++i) {
            while (j < i && arr[i] - arr[j] > mid) {
                ++j;
            }
            ans += i - j;
        }
        return ans;
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?