Just want to remove duplicates. Pool is vector but I seem to miss some elements at the start of the vector somehow. Can anyone verify
If you don't mind sorting the vector, then you can use std::unique. That would be O(Nlog(N))
#include
#include
#include
int main()
{
std::vector v{1,2,3,1,2,3,3,4,5,4,5,6,7};
std::sort(v.begin(), v.end());
auto last = std::unique(v.begin(), v.end());
v.erase(last, v.end());
for (const auto& i : v)
std::cout << i << " ";
std::cout << "\n";
}