Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
238 B
3
Indexable
Never
bool comp(string a, string b) {
    if(a.size() != b.size()) return a.size() < b.size();
    
    return a.compare(b) < 0;
}

vector<string> numSort(int n , vector<string >& a){
    sort(a.begin(), a.end(), comp);
    return a;
}