Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ check if vector is sorted

for(int i = 0; i < n.size()-1; i++)
        if(n[i] > n[i+1])
            return false;
    return true;
 
PREVIOUS NEXT
Tagged: #check #vector #sorted
ADD COMMENT
Topic
Name
6+6 =