The unordered_map::max_size is a built in function in C++ STL. It returns maximum number of elements which unordered_map can hold. Maximum number of elements in any container depends upon system and library implementation.
Parameters: It does not accept any parameters.
Return type: Unsigned integer a container can hold maximum elements.
Current size is : 0 max size is : 1152921504606846975 Current size is : 4 max size is : 1152921504606846975
Current size is : 0 max size is : 1152921504606846975 Current size is : 3 max size is : 1152921504606846975
Complexity : Its complexity is constant.
- multimap maxsize() in C++ STL
- Generate a random permutation of elements from range [L, R] (Divide and Conquer)
- Count of words that are present in all the given sentences
- Passing and Returning Objects in C++
- Train a Support Vector Machine to recognize facial features in C++
- Salesforce Interview Experience | On-Campus for FTE
- Find two numbers whose divisors are given in a random order
- unordered_set operators in C++ STL
- Dividing a Large file into Separate Modules in C/C++, Java and Python
- How to delete a range of values from the List using Iterator
- How to create a List with Constructor in C++ STL
- How to delete last element from a List in C++ STL
- Can C++ reference member be declared without being initialized with declaration?
- Finding Floor and Ceil of a Sorted Array using C++ STL
- Some useful C++ tricks for beginners in Competitive Programming