how to check an array is sorted or not stlc++ code example
Example: how to check array is sorted or not in c++
bool check_sorted(int a[],int n)
{
return is_sorted(a,a+n); //stl function
}
bool check_sorted(int a[],int n)
{
return is_sorted(a,a+n); //stl function
}