my code is not running for a single test case
#include
using namespace std;
bool issorted( int *a,int n )
{
if(n==1)
return true;
if(a[0] < a[1] && issorted(a+1,n-1))
return true;
return false;
}
int main() {
int n;
cin >> n;
int a[n];
for(int i=0; i<n; i++)
cin >> a[i];
if( issorted(a,n) )
cout <<“true”<< endl;
else
cout <<“false”<< endl;
return 0;
}