linked_list/linked_list1.cpp
// if linked list is sorted or not
if linked list is sorted or not
if linked list is sorted or not
int is_sorted(struct Node* p)
{
    int x = -1;
    while (p)
    {
        if(p->data < x)
        {
            return 0;
        }
        x = p->data;
        p=p->next;
    }
    return 1;    
}
int is_sorted ( struct Node * p ) { int x = -1 ; while ( p ) { if ( p -> data < x ) { return 0 ; } x = p -> data ; p = p -> next ; } return 1 ; }
if linked list is sorted or not
if linked list is sorted or not
// smallest number possible // change according to your convinience /* code */