Can you help me out where my test cases are failing in question - Increasing and Decreasing Sequence.
My Code -
long int a,b;
int n,i=0;
cin>>n;
cin>>a;
bool isDec;
while(i<n-1){
cin>>b;
if(a==b){
cout<<"false"<<endl;
break;
}
else if(b>a){
isDec=false;
}
else if(!isDec && b<a){
cout<<"false"<<endl;
break;
}
i++;
a=b;
}
if(i==n-1){
cout<<"true"<<endl;
}