@@ -0,0 +1,1148 @@
+/**%0A * Company%0A * Copyright (C) 2014-2017 All Rights Reserved.%0A */%0Apackage com.cwenao.datastructure;%0A%0A/**%0A * @author cwenao%0A * @version $Id BinarySearch.java, v 0.1 2017-07-18 13:12 cwenao Exp $$%0A */%0Apublic class BinarySearch %7B%0A%0A    private static int recursionBinarySearch(int%5B%5D array, int targetNum, int low, int high) %7B%0A%0A        if (array == null %7C%7C array.length == 0) %7B%0A            return -1;%0A        %7D%0A        if (low %3E= high) %7B%0A            return -1;%0A        %7D%0A%0A        int mid = (low + high) / 2;%0A        if (array%5Bmid%5D == targetNum) %7B%0A            return mid;%0A        %7D%0A        if (targetNum %3E array%5Bmid%5D) %7B%0A            return recursionBinarySearch(array, targetNum, mid + 1, high);%0A        %7D else %7B%0A            return recursionBinarySearch(array, targetNum, low, mid - 1);%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        int%5B%5D array = %7B1, 3, 4, 5, 8, 11, 42, 66, 78, 90, 114, 256%7D;%0A        int targetNum = 11;%0A        int low = 0;%0A        int high = array.length;%0A%0A        int index = recursionBinarySearch(array, targetNum, low, high-1);%0A        System.out.println(%22The index for targetNum is : %22 + index);%0A    %7D%0A%0A%7D%0A%0A

add the binary serach