summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDivay Prakash <divayprakash@users.noreply.github.com>2018-10-22 23:56:13 +0530
committerGitHub <noreply@github.com>2018-10-22 23:56:13 +0530
commit0b8fd8ff21fa3a2aaa05ed7514b7a1eadbabb953 (patch)
treed97ecee23ed0715932b77ff92bc7e4d92fce1b1f
parent88e24ff1a4311f5349d5919860e08d2eb39d6db7 (diff)
parent2e6208c754becae469c4056ac9ecdea40f490064 (diff)
Merge pull request #3321 from ankushagarwal/patch-1
[c++/en] Add comments about unordered_map and unordered_set
-rw-r--r--c++.html.markdown4
1 files changed, 4 insertions, 0 deletions
diff --git a/c++.html.markdown b/c++.html.markdown
index 8be5a278..225472cb 100644
--- a/c++.html.markdown
+++ b/c++.html.markdown
@@ -1057,6 +1057,8 @@ cout << ST.size(); // will print the size of set ST
// Output: 0
// NOTE: for duplicate elements we can use multiset
+// NOTE: For hash sets, use unordered_set. They are more effecient but
+// do not preserve order. unordered_set is available since C++11
// Map
// Maps store elements formed by a combination of a key value
@@ -1084,6 +1086,8 @@ cout << it->second;
// Output: 26
+// NOTE: For hash maps, use unordered_map. They are more effecient but do
+// not preserve order. unordered_map is available since C++11.
///////////////////////////////////
// Logical and Bitwise operators