max_size(): This function is available in the File: unordered_set.h. This function is a build-in function in STL of C++. This function returns the maximum size of the unordered_set.
Syntax:
std::size_t std::unordered_set<int>::max_size() const
This functions returns the maximum size of the unordered_set.
Parameters: NA
File: unordered_set.h
Approach
C++
#include <bits/stdc++.h>using namespace std;int main(){unordered_set<int> st = {1, 2, 3, 4, 5};cout << st.max_size() << "\n";return 0;}
Output:
1152921504606846975
No comments:
Post a Comment