VOOZH about

URL: https://www.geeksforgeeks.org/cpp/unordered_multiset-max_load_factor-in-c-stl/

⇱ unordered_multiset max_load_factor() in C++ STL - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

unordered_multiset max_load_factor() in C++ STL

Last Updated : 11 Jul, 2025
The unordered_multiset::max_load_factor() is a built-in function in C++ STL which returns the maximum load factor of the unordered_multiset container. This function also provides with an option of setting the maximum load factor. Syntax (To return the maximum load factor):
unordered_multiset_name.max_load_factor()
Parameters: The function does not accept any parameters. Return Value: It returns an integral values which denotes the maximum load factor of the container. Below programs illustrate the unordered_multiset::max_load_factor() function: Program 1:
Output:
Current parameters are :
max_load_factor= 1
load_factor= 0.571429
size of s1= 4
bucket_count= 7
Program 2:
Output:
Current parameters are :
max_load_factor= 1
load_factor= 0.571429
size of s1= 4
bucket_count= 7

Final parameters are :
max_load_factor= 0.5
load_factor= 0.235294
size of s1= 4
bucket_count= 17
Comment
Article Tags: