Answers for "vector unique in c++"

C++
2

vector unique in c++

sort(vec.begin(), vec.end());
vec.erase(unique(vec.begin(), vec.end()), vec.end());
Posted by: Guest on June-20-2021

Browse Popular Code Answers by Language