Created
April 2, 2016 06:45
-
-
Save steveobbayi/9fa2ba7961df8e82dd049fd1e5a2c6e3 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
unordered_set<string> uset = {"three","two","three"}; | |
unordered_set<string>::cons_iterator it = uset.find("three"); | |
if(it != uset.end()) | |
cout << *it << endl; | |
uset.insert("four"); | |
//More on hash tables on the unordered set | |
cout << "The load factor is " << uset.load_factor() << endl; | |
cout << "Total buckets " << uset.bucket_count() << endl; | |
string s | |
cout << s << " is located in the bucket at " << uset.bucket(s) << endl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment