public static boolean search1(int[] A, int target) {
        int len = A.length;
        int low = 0;
        int high = len - 1;
        while (low <= high) {
        	int mid = (high + low) / 2;
        	if (A[mid] == target) {
        		return true;
        	}
        	if (A[mid] > A[low]) {
        		if (A[mid] > target && target >= A[low]) {
        			high = mid - 1;
        		} else {
        			low = mid + 1;
        		}
        	} else if (A[mid] < A[low]) {
        		if (A[mid] < target && target <= A[high]) {
        			low = mid + 1;
        		} else {
        			high = mid - 1;
        		}
        	} else {
        		low = low + 1;
        	}
        	
        }
    	return false;
    }