public int searchInsert(int[] A, int target) {
		if(A==null || A.length<=0) return -1;
		
		int low=0, high=A.length-1,middle;
		
		while(low<=high){
			middle=low+((high-low)>>>1);
			if(A[middle]==target){
				return middle;
			}else if(A[middle]<target){
				low=middle+1;
			}else{
				high=middle-1;
			}
		}
		
		return low;
    }