![]() |
VOOZH | about |
The unordered_set::empty is a built-in function in C++ STL which is used to check if an unordered_set container is empty or not. It returns True if the unordered_set container is empty, otherwise it returns False.
Syntax:
set_name.empty()
Parameters: This function does not accepts any parameter.
Return Value: It returns a boolean value True if the unordered_set container is empty, else false.
Below programs illustrate the above function:
Program 1:
true false
Program 2:
false
Time complexity: O(1)