public void merge(int[] arr, int start, int mid, int end){
        int[] helper = new int[end - start + 1];

        int index = 0;
        int i = start, j = mid + 1;
        while(i <= mid && j <= end){
            if(arr[i] < arr[j])
                helper[index++] = arr[i++];
            else
                helper[index++] = arr[j++];
        }

        while(i <= mid){
            helper[index++] = arr[i++];
        }

        while(j <= end){
            helper[index++] = arr[j++];
        }

        for(int k = 0; k < end - start + 1; k++){
            arr[start + k] = helper[k];
        }
    }