Question: This question refers to binary search used in the rank method in class BinarySearch ( p . 4 7 ) . Assume integer keys with

This question refers to binary search used in the rank method in class BinarySearch (p.47).
Assume integer keys with sorted keys array: int[] keys ={10,20,30,40,50,60,70}; So initially in rank lo =0 and hi =6.
Suppose that key =50. What would be the value of the variable hi after two iterations of the while loop?
Question 1 options:
3
4
5
6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!