Question: How can the error be corrected? int func ( int [ ] arr, int size ) { if ( size = = 1 && arr
How can the error be corrected?
int func int arr, int size
if size && arr
return ;
return funarr size ;
public static int fun int arr, int a int b
int m;
if b a
return ;
mid a b;
if arrm && arrm
return m;
if arrm
return funarr m b;
else
return funarr a m ;
a Modify the method to return the index of the last
b No correction is needed.
c Do not sort the array.
d Change the condition to arrm && m arrm
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
