Hi, Which one of the following ways is better to store the non-duplicate numbers?
1- Using sort and unique in std :: vector in C++ like this :
sort(a.begin(), a.end());
a.erase(unique(a.begin(), a.end()), a.end());
2- Using std :: set in C++
I know set's Order is around $$$O(nlogn)$$$ with a little bad coefficients But I don't know what's the order of using vector and unique, So If it is possible tell me which one is faster and better, Thanks :).