Question: Identify the base case in the following code. public class FindMatch { public static int findMatch ( char array [ ] , int low, int
Identify the base case in the following code.
public class FindMatch
public static int findMatchchar array int low, int high, char key
if high low
int mid low high low;
if arraymid key
return mid;
if arraymid key
return findMatcharray low, mid, key;
else
return findMatcharray mid high, key;
return ;
Group of answer choices
if highlow
if arraymid key
if arraymid key
int mid low high low;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
