SyntaxFix
Write A Post
Hire A Developer
Questions
the fastest way (for programming contests by time complexity() = constant)
can erase 100M item in 1 second;
vector<int> it = (vector<int>::iterator) &vec[pos]; vec.erase(it);
and most readable way : vec.erase(vec.begin() + pos);
vec.erase(vec.begin() + pos);