Question: in java pls Write a class with a method called splitSearch with: - 2 parameters - a a sorted array of int - an int

in java pls in java pls Write a class with a method called splitSearch with:

Write a class with a method called splitSearch with: - 2 parameters - a a sorted array of int - an int target - algorithm: -.. create a variable called low and set it to the first index of the array -. create a variable called high and set it to the last index of the array -. loop until low is greater than high ....- find the midpoint index between low and high if the midpoint value matches the target, return true if the target is greater than the midpoint value set the low variable to mid +1 if the target is less than the midpoint value set the high variable to mid 1 when the loop ends, return false

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!