Question: Use this array to answer the following questions: int[] a = { 2, 5, 11, 14, 15, 27, 31}; a) What does mystery1(a, 5) return?
![Use this array to answer the following questions: int[] a =](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f1133a5858b_12966f11339b9afa.jpg)
Use this array to answer the following questions:
int[] a = { 2, 5, 11, 14, 15, 27, 31};
a) What does mystery1(a, 5) return?
b) Fill in the trace table to show that mystery2(a, 5) returns the same thing.

The following two methods do the same job. They each take an ORDERED array of ints and a target number as arguments. public static boolean mystery1 (int[l array, int target) f for (int i 0; i target) return false; return false public static boolean mystery2 (int[] array, int target) int low = 0; int high = array.length-1; while (low
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
