Modify the method binarySearch in Segment 18.13 so that it returns the index of the first array entry that equals desiredItem. If the array does not contain such an entry, return -(belongsAt + 1), where belongsAt is the index of the array location that should contain desiredItem. At the end of Segment 18.13, Question 7 asked you to return -1 in this case. Notice that both versions of the method return a negative integer if and only if desiredItem is not found.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.