Question 14:

The following code contains an error that causes infinite recursion for some inputs. 
Which line is the problem?

---

public static int search(int[] d, int lo, int hi, int t)
{
  int m = (lo + hi) / 2;
  if (d[m] == t) return m;
  else if (d[m] > t) return search(d, lo, m, t);
  else return search(d, m, hi, t);
}

---

A. The mid calculation should use (lo + hi + 1) / 2.
B. The recursive calls should use m - 1 and m + 1 instead of m.
C. The base case should check lo == hi before computing mid.
D. The comparisons > and < are reversed.
