Last active
May 13, 2021 10:24
-
-
Save khalefa-phd/493b8a0742d0facc04ea25f5d38c0d35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <unordered_map> | |
using namespace std; | |
int main(){ | |
unordered_map<int, int> h; | |
for(long i=0;; i++) | |
{ | |
try{ | |
h[i]=i; | |
if(i%1000000==0){ | |
cout << i << "\n"; | |
std::cout << "max_size = " << h.max_size() << std::endl; | |
std::cout << "max_bucket_count = " << h.max_bucket_count() << std::endl; | |
std::cout << "max_load_factor = " << h.max_load_factor() << std::endl; | |
} | |
} catch (const std::exception& e) { | |
std::cout << "Exception failed: " << e.what() << '\n'; | |
} | |
} | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment