Study
C++ · STL: set
std::set and std::unordered_set for unique elements, insert's return value, and set operations with algorithms.
- insert() returns a pair telling you whether the element was actually new.
- Set algebra in C++ is done with algorithms like std::set_intersection on sorted ranges.