Sorted array____________

i am getting wrong answer in one of the test case

Hi mukul
Share your code…

#include
using namespace std;
bool issorted(long long a[],long long n)
{
if(n==1)
{
return true;
}
if(a[0]<a[1]&&issorted(a+1,n-1))
{
return true;
}
return false;
}
int main() {
long long n;
cin>>n;
long long a[n];
for(long long i=0;i<n;i++)
{
cin>>a[i];
}
if(issorted(a,n))
{
cout<<“true”;
}
else
{
cout<<“false”;
}
return 0;
}

i got the mistake and code is working for all the test cases

Ya u have to do a 0 is less than and equal to a1

Ok mark ur doubt resolved and gave feedback
Happy coding.