private static void merge(int[] arr, int left, int middle, int right){
		int[] tmpArr = new int[arr.length];
		int mid = middle + 1;
		int tmp = left;
		int third = left;
		
		while(left<=middle && right>=mid){
			if(arr[left]<=arr[mid]){
				tmpArr[third++] = arr[left++];
			}else {
				tmpArr[third++] = arr[mid++];
			}
		}
		
		while(left <= middle){
			tmpArr[third++] = arr[left++];
		}
		
		while(mid <= right){
			tmpArr[third++] = arr[mid++];
		}
		
		while(tmp <= right){
			arr[tmp] = tmpArr[tmp++];
		}
		
	}// a method of merge sort