@@ -0,0 +1,1005 @@
+/**%0A * Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). %0A * You are given a target value to search. If found in the array return its index, otherwise return -1. %0A * You may assume no duplicate exists in the array.%0A * @author Jun%0A */%0A %0Apublic class Solution %7B%0A    public int search(int%5B%5D nums, int target) %7B%0A        int left = 0, right = nums.length - 1;%0A        while(left %3C= right) %7B%0A        %09int mid = left + (right - left)/2;%0A        %09if(target == nums%5Bmid%5D) return mid;%0A        %09if(nums%5Bmid%5D %3E= nums%5Bleft%5D) %7B%0A        %09%09if(target %3E nums%5Bmid%5D)%09%0A        %09%09%09left = mid + 1;%0A        %09%09else if(target %3E= nums%5Bleft%5D)%0A        %09%09%09right = mid - 1;%0A        %09%09else%0A        %09%09%09left = mid + 1;%0A        %09%7D else %7B%0A        %09%09if(target %3C nums%5Bmid%5D)%0A        %09%09%09right = mid - 1;%0A        %09%09else if(target %3C= nums%5Bright%5D)%0A        %09%09%09left = mid + 1;%0A        %09%09else%0A        %09%09%09right = mid - 1;%0A        %09%7D%0A        %7D%0A        return -1;       %0A    %7D%0A%7D%0A

Create 033.java