Add a value to a set. Do nothing if the given value already exists. The time complexity is O(log size).
Check whether a value belongs to a set. The time complexity is O(log size).
Create an empty set.
Iterate over elements in ascending order.
Check whether a set is empty.
Return the maximum element of a set. The time complexity is O(log size).
Return the minimum element of a set. The time complexity is O(log size).
Remove an element from a set. Do nothing if the given value does not exist. The time complexity is O(log size).
Create a set with a single element.
Return the number of key-value pairs. The time complexity is O(1).
Set
.