Check if array is sorted using rucursion

my code is not passing the second test case.

here is the code:

@Keshav99
Hello Keshav,
In line no -11
a)just replace < with <= and your code will work fine.
b)you forgot to read n.

its still not passing the second test case here is the updated code:

@Keshav99
Hello Keshav,
in line no - 11 replace n-- with n-1 it will work

thanks : ) it worked !!

1 Like

@Keshav99
pls dont forget to mark it as resolved