I have some data stored in vector ;
vector<string> data ;
I want to sort strings in data, alphabetically.Are there any sorting algorithm or complex library which you can recommend me?
Ex ;
assume in data ;
aaaa
ccc
bbb
acb
after sorting, data ;
aaaa
acb
bbb
ccc
Vector? Did you write it yourself? Did you meanvector(lowercase) from the STL? It's hard to know how to help you without more details about this type.std::sortand forget about the issue until you recognize it as a problem? Note that your set of requirements might be ill-defined, if you demonstrate that you do need something faster thanstd::sort, then you most probably don't want to use astd::vector(BTW, if you prepend standard types withstd::in questions, it will be clear that you refer tostd::vectorand nothomebrew::vector)