Sunday, 15 October 2017

Sort vector of vector in C++

Sort each vector independently...

vector < vector < int > > vec;

for(int i=0;i<vec.size();i++)
std::sort(vec[i].begin(),vec[i].end(),compare);

No comments:

Post a Comment

Popular Posts