Consider this code:
public static void displayArray3(int [] array, int first, int last)
if (first == last)
System.out.printin(array[first] + " ");
else
{
int mid = (first + last) / 2; //consider first + (last-first) /2
displayArray3 (array, first, mid);
displayArray3 (array, mid + 1, last);
}
}
An initial call to displayArray3 has parameter
values of 0 and 20 for first and last respectively:
displayArray3(myArray, 0, 20).
There are no hints for this question