@@ -0,0 +1,817 @@
+public class Problem9_3 %7B%0A  public static void main(String%5B%5D args) %7B%0A    int%5B%5D test = new int%5B%5D%7B -40, -20, -10, 0, 1, 4, 5, 6, 8, 10 %7D;%0A%0A    System.out.println(findMagicIndex(test));%0A    System.out.println(findMagicIndexFast(test));%0A  %7D%0A%0A  public static int findMagicIndex(int%5B%5D arr) %7B%0A    for (int i = 0; i %3C arr.length; i++) %7B%0A      if (arr%5Bi%5D == i) return i;%0A    %7D%0A    return -1;%0A  %7D%0A%0A  public static int findMagicIndexFast(int%5B%5D arr) %7B%0A    return findMagicIndexFast(arr, 0, arr.length - 1);%0A  %7D%0A%0A  public static int findMagicIndexFast(int%5B%5D arr, int lo, int hi) %7B%0A    if (hi %3C= lo) return -1;%0A    int mid = (hi + lo) / 2;%0A    if (arr%5Bmid%5D == mid) return mid;%0A    if (arr%5Bmid%5D %3C mid) %7B%0A      return findMagicIndexFast(arr, mid + 1, hi);%0A    %7D else %7B%0A      return findMagicIndexFast(arr, lo, mid - 1);%0A    %7D%0A  %7D%0A%0A%7D%0A

Add problem 9_3 solution