For this Question: You are given an array of size n containing distinct integers, where n is odd. Find the element which has the same number of lesser elements and the same number of greater elements in the array.First line of the input contains an integer, N, which denotes the length of the array. Next N inputs are elements of the array. 

Constraints
1 <= N <= 20
-10000 <= Arr[i] <= 10000Single integer n which has the same number of lesser elements and the same number of greater elements.Input:
3
3 1 2

Output:
2

Explanation:-
2 has one greater element 3 and one smaller element 1

Input: 
5
2 3 4 9 1

Output:
3, I have written this Solution Code: import java.io.*;
import java.util.*;



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

	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	String[] str=br.readLine().split("\\s+");
	int N=Integer.parseInt(str[0]);
	 str=br.readLine().split("\\s+");
	 int arr[]=new int[N];
	 for(int i=0;i<N;i++){
		 arr[i]=Integer.parseInt(str[i]);
	 }
	findElement(arr,N);
	}
	public static void findElement(int arr[],int N){
		int start=0;
		int end=N;Arrays.sort(arr);
		int mid=start+(end-start)/2;
		System.out.print(arr[mid]);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?