public void merge(int A[], int m, int B[], int n) {
    	int i = 0;
    	int j = 0;
    	int k = 0;
    	int[] C = new int[m+n];
    	while(i < m || j < n){
    		if(i==m){
    			C[k++] = B[j++];
    			continue;
    		}
    		if(j==n){
    			C[k++] = A[i++];
    			continue;
    		}
    		if( A[i] < B[j]){
    			C[k++] = A[i++];
    		}
    		else{
    			C[k++] = B[j++];
    		}
    	}
    	for(int t = 0; t<m+n; t++)
    		A[t] = C[t];
    }