std::set and std::multiset
Sorted collections of unique (set) or repeated (multiset) keys — balanced trees, O(log n).
Easy
s.insert(5); s.contains(5); (C++20).
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.