1 testcase is failed

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

}

In recursion,
change this if(a[i]<a[i+1]) to if(a[i]<=a[i+1]) and then check

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.