public int search(int[] A, int target) {
		if(A==null || A.length==0){
			return -1;
		}
		if(A.length==1){
			if(A[0]==target){
				return 0;
			}else{
				return -1;
			}
		}
        int pivot = findPivot(A);
       // System.out.println(pivot);
        if(pivot==-1){
        	//System.out.println("dd");
        		return binarySearch(A,target,0,A.length-1);
        }
        if(target>A[pivot] || target <A[pivot + 1]){
        	return -1;
        }else if(target >= A[0]){
        	return  binarySearch(A,target,0,pivot);
        }else
        	return  binarySearch(A,target,pivot+1,A.length-1);
	}