@@ -0,0 +1,548 @@
+public class BS %7B%0A    public static void main(String%5B%5D args) %7B%0A      System.out.println(bs(new int%5B%5D%7B1, 2, 3, 4, 5, 6, 7, 8%7D, 8));%0A    %7D%0A%0A    static int bs(int%5B%5D arr, int s) %7B%0A        return bs(arr, s, 0, arr.length - 1);%0A    %7D%0A%0A    static int bs(int%5B%5D arr, int s, int lo, int hi) %7B%0A        int i = (hi + lo) / 2;%0A        int m = arr%5Bi%5D;%0A        if (s == m) %7B%0A            return i;%0A        %7D%0A        if (hi - lo == 0) return -1;%0A        if (s %3C m) %7B%0A            return bs(arr, s, lo, i - 1);%0A        %7D%0A        return bs(arr, s, i + 1, hi);%0A    %7D%0A%7D%0A

Fix bug...