public ArrayList<Integer> MergeSort (ArrayList<Integer> number, int start, int end){
        if (start == end){
            ArrayList<Integer> tmp = new ArrayList<Integer>();
            tmp.add(number.get(start - 1));
            return tmp;
        }
        // Set mid place
        int mid = (end - start + 1) / 2;
        ArrayList<Integer> left = MergeSort(number, start, start + mid - 1);
        ArrayList<Integer> right = MergeSort(number, start + mid, end);
        // Sort the two arrays
        ArrayList<Integer> result = new ArrayList<Integer>();
        int i = 0;
        int j = 0;
        while (i < left.size() && j < right.size()){
            if (left.get(i) > right.get(j)){
                result.add(right.get(j));
                j++;
                count += left.size() - i;
            }
            else {
                result.add(left.get(i));
                i++;
            }
        }
        if (j == right.size()){
            while(i < left.size()){
                result.add(left.get(i));
                i++;
            }
        }
        else if (i == left.size()){
            while(j < right.size()){
                result.add(right.get(j));
                j++;
            }
        }
        return  result;
    }