If array is 1,2,3,3,4,5, the sort function outputs 0. That means we should check the condition as a[0]<=a[1] for the above test case right?
Recursion to check if array is sorted - test case
@niveditha_palli yes sorted means the elements should be in increasing order, not strictly increasing.
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.