For this Question: Given an unsorted array A of size N and value K. The elements of the array A contains positive integers. You have to print all the elements which are greater than K in the array in sorted order (including K as well if present in the array A), and print all the elements which are smaller than K in sorted order both of them in separate lines. If the elements greater than or equal to K are not present in the array then print "-1". Similarly, in the case of smaller elements print -1 if elements smaller than K doesn’t exist. If a number appears more than once print number more than once.First line of input contains number of testcases T. For each testcase, there are two lines, first of which contains N and K separated by space, next line contains N space separated integers.


Constraints:
1 <= T <= 100
1 <= N <= 100000
1 <= K <= 1000000
1 <= A[i] <= 1000000
Sum of N over all test cases do not exceed 100000For each testcase, print the required elements(if any), else print "-1" (without quotes)Input:
1
5 1
2 1 5 7 6

Output:
1 2 5 6 7
-1

Explanation:
Testcase 1 : Since, 1, 2, 5, 6, 7 are greater or equal to given K. Also, no element less than K is present in the array., I have written this Solution Code: import java.io.*;
import java.util.*;

class Reader{
	BufferedReader reader;

	Reader(){
		this.reader = new BufferedReader(new InputStreamReader(System.in));
	}

	public String read() throws IOException {
		return reader.readLine();
	}

	public int readInt() throws IOException {
		return Integer.parseInt(reader.readLine());
	}

	public long readLong() throws IOException {
		return Long.parseLong(reader.readLine());
	}

	public String[] readArray() throws IOException {
		return reader.readLine().split(" ");
	}


	public int[] readIntegerArray() throws IOException {
		String[] str = reader.readLine().split(" ");
		int[] arr = new int[str.length];
		for(int i=0;i<str.length;i++) arr[i] = Integer.parseInt(str[i]);
		return arr;
	}

	public long[] readLongArray() throws IOException {
		String[] str = reader.readLine().split(" ");
		long[] arr = new long[str.length];
		for(int i=0;i<str.length;i++) arr[i] = Long.parseLong(str[i]);
		return arr;
	}
}

public class Main {

	public static void main(String[] args) throws IOException {
		Reader rdr = new Reader();
		int t = rdr.readInt();
        while(t-- > 0){
            int[] str = rdr.readIntegerArray();
            int n = str[0];
            int k = str[1];
            int[] arr = rdr.readIntegerArray();

            Arrays.sort(arr);
            int c=0;

            for(int i=0;i<n;i++){
                if(arr[i]>=k){
                    System.out.print(arr[i]+" ");
                    c++;
                }
            }
            if(c==0) System.out.print(-1);
            System.out.println();
            if(c==n) System.out.print(-1);
            else for(int i=0;i<n-c;i++) System.out.print(arr[i]+" ");
            System.out.println();
        }
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?