static int search(int[] a, int target) {

        int pivot = findPivot(a); //find rotated point
        int left = Arrays.binarySearch(a, 0, pivot, target); // search left of array
        if (left > -1) return left;
        int right = Arrays.binarySearch(a, pivot, a.length, target); // search right of array
        if (right > -1) return right;
        return -1;
    }
Solution is easy, we first find rotated pivot index and binary search both sides of pivot.
Time complexity is Log(N);
This does not solve when there is duplicates in the array. please look at SearchinRotatedSortedArray.java
for duplicate support
src/problems/medium/SearchinRotatedSortedArray.java