@@ -0,0 +1,957 @@
+package search;%0A%0A/**%0A * Created by zhenweiyu on 2017/5/21.%0A */%0Apublic class InsertValueSearch %7B%0A%0A    /*%0A     *  @param int %5B%5Dnum %E6%9C%89%E5%BA%8F%E6%95%B0%E5%88%97%0A%0A     */%0A    public static int search(int %5B%5Dnum,int lowIndex,int highIndex,int target)%7B%0A%0A        int findIndex = lowIndex + (target-num%5BlowIndex%5D)/(num%5BhighIndex%5D-num%5BlowIndex%5D)*(highIndex-lowIndex);%0A        if (target%3EfindIndex)%7B%0A            for(int index= findIndex;index%3C=highIndex;index++)%7B%0A                if(target == num%5Bindex%5D)%7B%0A                    return index;%0A                %7D%0A            %7D%0A        %7Delse%7B%0A            for(int index = findIndex-1;index%3E=0;index--)%7B%0A                if(target == num%5Bindex%5D)%7B%0A                    return index;%0A                %7D%0A            %7D%0A        %7D%0A        return Integer.MAX_VALUE;%0A    %7D%0A%0A    public static void main(String %5B%5Dargs)%7B%0A        int %5B%5Dnum = new int%5B%5D%7B4,5,6,7,8,9,10,11,12,13,14,15,16,20,25,29%7D;%0A        System.out.println(search(num,0,num.length-1,20));%0A%0A    %7D%0A%0A%7D%0A

Create InsertValueSearch.java