.. ot-exercise:: cxx.exercises.stl.uniq .. include:: Exercise: Uniquify A Sequence ============================= .. contents:: :local: .. sidebar:: **Documentation** * `std::set `__ Transform an input sequence (in the form of a ``std::vector``) into an output sequence such that * duplicate elements are removed * the remaining elements in the output sequence appear in the same order as in the input sequence **Hint:** the data structure that is used to decide if an element has already occurred would be a ``std::set``. Documentation see `here `__ .. literalinclude:: /trainings/material/soup/cxx-code/stl-exercises/tests/test-uniq.cpp :caption: :download:`/trainings/material/soup/cxx-code/stl-exercises/tests/test-uniq.cpp` :language: c++