Skip to content

Instantly share code, notes, and snippets.

@vishnujayvel
Created July 7, 2013 16:34
Show Gist options
  • Save vishnujayvel/5944007 to your computer and use it in GitHub Desktop.
Save vishnujayvel/5944007 to your computer and use it in GitHub Desktop.
bool isSet(int arr[],int n){
int i=0;
while(i<n){
if(arr[i]<0)
return false;
if(i==0){
i++;
continue;
}
if(arr[i]<=arr[i-1])
return false;
i++;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment