For this Question: Print the number of reverse pairs in the array given an integer array nums.

A reverse pair is a pair (i, j) where 0 <= i < j < nums.length and nums[i] > 2 * nums[j].The first line of input will be n, which represents the array's length, followed by the n array items in the second line.

Constraints:
0<= n <=10000
1 <= nums[i] <= 10000Print the number of reverse pairs in the array.Sample Input 1:
4
1 3 4 5
Output 1:
0

Sample Input 2:
6
6 5 4 3 2 1
Output 2:
6, I have written this Solution Code: import java.util.Scanner;
class Solution {
    static int mergeSort(int[] arr, int[] temp, int s, int e){
        int cnt = 0;
        if(e>s){
            int m = (s+e)/2;
            cnt += mergeSort(arr, temp, s, m);
            cnt += mergeSort(arr, temp, m+1, e);
            cnt += merge(arr, temp, s, m, e);
        }
        return cnt;
    }
    static int merge(int[] arr, int[] temp, int s, int m, int e){
        int i = s, j = m+1, k = s;
        int cnt = 0;
        while(i<=m){
            while(j<=e && arr[i] > 2*(long)arr[j]){
                j++;
            }
            cnt += (j - (m+1));
            i++;
        }
        i = s; j = m+1;
        while(i <= m && j <= e){
            if(arr[i] <= arr[j])
                temp[k++] = arr[i++];
            else
                temp[k++] = arr[j++];
        }
        while(i<=m)
            temp[k++] = arr[i++];
        while(j<=e)
            temp[k++] = arr[j++];
        for(int x = s; x<=e;x++)
            arr[x] = temp[x];

        return cnt;
    }
    public int reversePairs(int[] arr,int n) {
        int[] temp = new int[n];
        int cnt = mergeSort(arr, temp, 0, n-1);
        return cnt;
    }
}
class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n= scanner.nextInt();
        int arr[] = new int[n];
        for(int i=0;i<n;i++)
            arr[i] = scanner.nextInt();
        Solution solution = new Solution();
        int ans = solution.reversePairs(arr,n);
        System.out.println(ans);
    }
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?