Question: Hi, I am trying to implement a binary search algorithm in this method. Do you know why am I getting an error message for this,

 Hi, I am trying to implement a binary search algorithm in

Hi,

I am trying to implement a binary search algorithm in this method. Do you know why am I getting an error message for this, also is my implementation correct?

protected void runBinarySearch (Person target, List list) int low = 0; int high = list.size()-1; int middle-(low+high)/2: for (int i = 0: i high)

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!