Thursday, July 30, 2009

C++ code for removing duplicate values from a vector?

Just read each value store in aux variable and compare to the rest of the vector. If you can sort this vector first the duplicate values should be at the following positions. E.g.





11222233333





Otherwise you'll need to read every value and compare to the other ones.


No comments:

Post a Comment