private int find_K(int A[], int startA, int B[], int startB, int k)
	{
	    
	    if(A.length ==0 || A.length <= startA) return B[startB+k-1];
	    if(B.length ==0 || B.length <= startB) return A[startA+k-1];
	    
	    if(k==1)
	    {
	        if(A[startA]<B[startB])
	            return A[startA];
	        else
	            return B[startB];
	    }
	
	    int checkAIndex = k/2;
	    
	    if(startA+checkAIndex > A.length) checkAIndex = A.length -startA;
	    int checkBIndex = k-checkAIndex;
	    checkAIndex--; 
	    checkBIndex--;
	    
	    if(A[startA+checkAIndex] == B[startB+checkBIndex]) return A[startA+checkAIndex];
	    
	    if(A[startA+checkAIndex] < B[startB+checkBIndex]) 
	    {
	        startA += checkAIndex+1;
	        k = k-checkAIndex-1;
	        return find_K(A, startA, B, startB, k);
	    }else
	    {
	        startB += checkBIndex+1;
	        k = k-checkBIndex-1;
	        return find_K(A, startA, B, startB, k);
	    }
	    
	}