sorting n strings in alphabetical order code example
Example: sort strings by length and by alphabet
bool comp(string a, string b) {
if (a.size() != b.size()) return a.size() < b.size(); // primarily by length
return a < b; //secondarily by alphabetical
}