one test case is not passing
One test case is not passing
Your mistakes
- base case condition is wrong instead of 1 it should be i
if(n==i){
return true;
}
- if(A{i]<A[i+1]) then you have to return
if(A[i]<A[i+1]){
return is_sorted(A,i+1,n);
}
Modified Code
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.