The following table describes the commonly used set APIs:
|
API |
Description |
|
insert( value ) |
This inserts a value into the set |
|
clear() |
This clears all the values in the set |
|
size() |
This returns the total number of entries present in the set |
|
empty() |
This will print true if the set is empty, and returns false otherwise |
|
find() |
This finds the element with the specified key and returns the iterator position |
|
equal_range() |
This returns the range of elements matching a specific key |
|
lower_bound() |
This returns an iterator to the first element not less than the given key |
|
upper_bound() |
This returns an iterator to the first element greater than the given key |