private void merge(int[] array, int start, int mid, int end){
		int leftIndex = start;
		int rightIndex = mid+1;
		int helperIndex = start;
		
		//Compare and add elements in sorted manner to helper array
		while(leftIndex <= mid && rightIndex <= end){
			if(array[leftIndex] < array[rightIndex]){
				mHelperArray[helperIndex++] = array[leftIndex++];
			}else if(array[rightIndex] < array[leftIndex]){
				mHelperArray[helperIndex++] = array[rightIndex++];
			}else if(array[leftIndex] == array[rightIndex]){
				mHelperArray[helperIndex++] = array[leftIndex++];
				mHelperArray[helperIndex++] = array[rightIndex++];
			}
		}
		
		//Copy leftover items from left array to helperArray
		while(leftIndex <= mid){
			mHelperArray[helperIndex++] = array[leftIndex++];
		}
		
		//Copy leftover items from right array to helperArray
		while(rightIndex <= end){
			mHelperArray[helperIndex++] = array[rightIndex++];
		}
		
		//Copy helper to input array
		int i=start;
		while(i<=end){
			array[i] = mHelperArray[i];
			i++;
		}
	}