If I use sort(), can I say my algorithm is O(n) ?

Thanks.

```
bool compareVec( const int& a, const int& b) {
return a < b;
}
int longestConsecutive(vector<int> &num) {
int size = num.size();
if( size < 2 )
return size;
sort( num.begin(), num.end(), compareVec );
int len = 1;
int flag = 1;
for( int i = 1; i < size; ++i ) {
if( num[i] - num[i-1] == 1 ) {
flag++;
} else {
if( flag > len ) {
len = flag;
}
flag = 1;
}
}
if( flag > len ) {
len = flag;
}
return len;
}
```