Learning Topics
Choose Topics Accordingly
Set in C++
- Sets are containers that store unique elements following a specific order. The values are stored in a specific sorted order i.e. either ascending or descending.
- The value of the element cannot be modified once it is added to the set, though it is possible to remove and add the modified value of that element.
vector<int>v;
Size:1
3
set<int>v; Size:
1
Unique & Sorted Elements
3
Code
- Initializing a Set
CPP - Inset an Element in Set
CPP - Erase Elements in Set
CPP - Swap in Set
CPP - Clear Elements
CPP - Find and Erase Elements in Set
CPP