#1801
Remove duplicate elements from multiple input vectors at the same time
Hello guys,
If we have the following input data vectors (same size dimension)
std::vector<int64_t> times = {1, 2, 1, 3, 4, 1, 2, 3, 4, 5}; std::vector doubles = {1.1, 2.1, 1.1001, 3.1, 4.1, 1.1, 2.1, 3.1, 4.1, 5.1}; std::vectorstd::string values = {"s1", "s2", "s1s1", "s3", "s4", "s1", "s2", "s3", "s4", "s5"};
I want to modify the original three vectors by removing the duplicates. I consider that there is duplicate if times[n] = times[k] && doubles[n] = doubles[k]
Is there an elegant and effitient solution with the range-v3 library ?
Many thanks in advance, dimy-x
Activity
0No activity yet.