Sir, where am i doing mistake ? please help me to find that

Modified code

in the if condition you have to return the ans

sir, instead of doing this, i faill in one test case

do this

if (a[i]<=a[i+1]) {

        return check_sorted(a,i+1,n);

    }

also add equal to in the condition

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.