private void merge(int[] arr, int[] helper, int start, int middle, int end) {
        for(int i = 0;i<arr.length;i++) helper[i] = arr[i];

        int lstart = start;
        int rstart = middle + 1;
        int current = lstart;

        while(lstart <= middle && rstart <= end)
        {
            if(helper[lstart] <= helper[rstart]) {
                arr[current] = helper[lstart];
                lstart++;
            }
            else{
                arr[current] = helper[rstart];
                rstart++;
            }
            current ++;
        }
        while(lstart <= middle){
            arr[current] = helper[lstart];
            current++;
            lstart++;
        }
    }