Let n be the number of elements from index i to the end of the array. Which recurrence describes the running time of this method?
static int countNeg(int[] a, int i) {
if (i == a.length) return 0;
int rest = countNeg(a, i + 1);
return (a[i] < 0 ? 1 : 0) + rest;
}