From 94ad077b3da87e9f4e615fb7e68513bca8dd74a3 Mon Sep 17 00:00:00 2001 From: UberChili Date: Thu, 8 Jun 2023 15:30:07 -0600 Subject: [PATCH] Elaborated a little more on count.md for a more correct description. Fixed inconsistencies in white spaces in the example code --- unordered_map/count.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unordered_map/count.md b/unordered_map/count.md index 0782d206..d42b5e1f 100644 --- a/unordered_map/count.md +++ b/unordered_map/count.md @@ -1,7 +1,7 @@ # count -**Description :** This function is used to determine if an element is in the map. It returns one if the element is in the map -else it returns zero. +**Description :** This function is used to determine if an element is in the map. More verbally, this function obtains the number of elements that match a specific key, but since this container (an unordered map) does not allow for duplicates, it only returns either 1 or 0. +So, it returns 1 if the element is in the map, else it returns 0. **Example** : @@ -14,8 +14,8 @@ else it returns zero. int main (){ //Creates a map of Spanish Speaking Countries in the Caribbean and calls it SpanishSpeakingCaribbean - std::unordered_multimap SpanishSpeakingCaribbean = { - {"Cuba","Havana"}, + std::unordered_multimap SpanishSpeakingCaribbean = { + {"Cuba", "Havana"}, {"Dominican Republic", "Santo Domingo"}, {"Puerto Rico", "San Juan"} };