For this Question: Given an array of positive integers. The task is to find inversion count of array.

Inversion Count : For an array, inversion count indicates how far (or close) the array is from being sorted. If array is already sorted then inversion count is 0. If array is sorted in reverse order that inversion count is the maximum. 
Formally, two elements a[i] and a[j] form an inversion if a[i] > a[j] and i < j.

Asked in Adobe, Amazon, Microsoft.The first line of each test case is N, the size of the array. The second line of each test case contains N elements.

Constraints:-
1 ≤ N ≤ 10^5
1 ≤ a[i] ≤ 10^5Print the inversion count of array.Sample Input:
5
2 4 1 3 5

Sample Output:
3

Explanation:
Testcase 1: The sequence 2, 4, 1, 3, 5 has three inversions (2, 1), (4, 1), (4, 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));
		 int n=Integer.parseInt(br.readLine());
		String input[]=br.readLine().split("\\s");

		 int a[]=new int[n];
		 for(int i=0;i<n;i++)
		 {
			 a[i]=Integer.parseInt(input[i]);
		 }

		 System.out.print(implementMergeSort(a,0,n-1));

		}
		public static long implementMergeSort(int arr[], int start, int end)
	    {
		  long count=0;
	      if(start<end)
			{
	      int mid=start+(end-start)/2;

	      count +=implementMergeSort(arr,start,mid);
	      count +=implementMergeSort(arr,mid+1,end);

	      count +=merge(arr,start,end,mid);

			}

	      return count;
	    }

	public static long merge(int []a,int start,int end,int mid)
	{
	  int i=start;
	  int j=mid+1;
	  int k=0;
	   int len=end-start+1;
	  int c[]=new int[len];
	  long inv_count=0;

	  while(i<=mid && j<=end)
	  {
	    if(a[i]<=a[j])
	    {
	      c[k++]=a[i];
		  i++;
	    }
	    else
	    {
	      c[k++]=a[j];
	      j++;
	      inv_count +=(mid-i)+1;
	    }
	  }

	  while(i<=mid)
	  {
	    c[k++]=a[i++];
	  }

	   while(j<=end)
	  {
	    c[k++]=a[j++];
	  }

	  for(int l=0;l<len;l++)
	    a[start+l]=c[l];

	  return inv_count;

	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?