{"id":26162,"date":"2021-03-26T11:14:00","date_gmt":"2021-03-26T05:44:00","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/"},"modified":"2024-09-03T11:08:55","modified_gmt":"2024-09-03T05:38:55","slug":"unordered_map-in-cpp","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/","title":{"rendered":"unordered_map in C++"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"unordered_map-c\"><strong>unordered_map C++<\/strong><\/h2>\n\n\n\n<p>The unordered_map in C++ is like a data structure of dictionary type that store element. It has a sequence of (key, value) pair, which allows fast retrieval of an individual element based on their unique key.<\/p>\n\n\n\n<p>The function of each unique key is to hold only a single value associated with it, and key-value is generally used to identify the element uniquely. It is often referred to as an associative array. In (key, value) pair, the mapped value is an object with content associated with each unique key. For each pair type of key and mapped value may differ.<\/p>\n\n\n\n<p>In an unordered map, the element does not get sorted in any particular order with respect to either their key-value or mapped value. Instead, it organises values into bucket depending on their hash values that allow fast access to the individual element directly by their key values.<\/p>\n\n\n\n<p><strong>Note:<\/strong> unordered_map container performs faster than map when they have to access an individual element by their key. Generally, they get less efficient when it comes to range iteration through a subset of their elements.<\/p>\n\n\n\n<p>Unordered_map in C++ implements the direct access operator (subscript operator []), allowing direct access of mapped value using its key value as the argument.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"example\"><strong>Example<\/strong><\/h4>\n\n\n\n<p>Here is example of std:: unordered_map from &lt;unordered_map&gt; header file<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntemplate &amp;lt; class Key,\n           class T,\n           class Hash = hash&amp;lt;Key&gt;,\n           class Pred = equal_to&amp;lt;Key&gt;,\n           class Alloc = allocator&amp;lt; pair&amp;lt;const Key,T&gt; &gt;\n           &gt; class unordered_map;\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"unordered_map-class-template\"><strong>Unordered_map-class template<\/strong><\/h2>\n\n\n\n<p>The unordered_map class template is defined in the Standard Template Library <strong>(STL) <\/strong>of C++; it is a set of a Class template to use in common programming task such as in data structure and function such as in a list, stack, array etc. Usually, it is a library of container classes, algorithm, and iterators. It is a generalised library, and so, its components are parameterised.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"template-parameters\"><strong>Template Parameters&nbsp;<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Parameter&nbsp;&nbsp;<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td><strong>Key<\/strong><\/td><td>It has a type of key values as each element in an unordered map is uniquely identified by its key value.<strong>&nbsp;&nbsp;<\/strong><\/td><\/tr><tr><td><strong>T<\/strong><\/td><td>Type of mapped value as each element in an unordered map is used to store some data as its mapped value.<\/td><\/tr><tr><td><strong>Hash<\/strong><\/td><td>A unary function object type that takes an object of type key type as an argument and returns a unique value of the type size_t based on it. This can be either a class implementing a function call operator or a pointer to function. This defaults to hash&lt;key&gt;, which return a hash value with a&nbsp;Probability of the collision approaching&nbsp;1.0\/std :: numeric_limits &lt;size_t&gt; :: max().The unordered map object uses the hash values returned by this function to organise its elements internally, speeding up the process of locating individual elements.<\/td><\/tr><tr><td><strong>Pred<\/strong><\/td><td>A binary predicate that takes up two arguments of the key type and returns a bool. The expression pred(a,b), where 'pred' is an object of this type, and a and b are key values, shall return true if a is to be considered equivalent to b. This can be either a class implementing a function call operator or a pointer to a function (see the constructor for an example). This defaults to the equal_to&lt;Key&gt;, which returns the same as applying the equal-to operator (a==b). The unordered_map object uses this expression to determine whether two-element keys are equivalent. No two elements in an unordered_map container can have keys that yield true using this predicate.<\/td><\/tr><tr><td><strong>Alloc<\/strong><\/td><td>It is a type of allocator object used to define the storage allocation model. The allocator class template is used by default, which defines the simplest memory allocation model and is value-independent.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>In the reference for the unordered_map member functions, these same names (Key, T, Hash, Pred and Alloc) are assumed for the template parameters.<\/p>\n\n\n\n<p>The elements are organised into buckets. Keys with a similar hash code are stored in the same bucket.<\/p>\n\n\n\n<p>The number of buckets is automatically increased by a call to insert or as the result of calling rehash.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"unordered_map-public-types\"><strong>Unordered_map public types<\/strong><\/h2>\n\n\n\n<p><strong>1. typedef <\/strong>implementation-defined size_type;<\/p>\n\n\n\n<p>An unsigned integral type.<\/p>\n\n\n\n<p>'size_type' can represent any non-negative value of difference_type.<\/p>\n\n\n\n<p><strong>2. typedef <\/strong>implementation-defined difference_type;<\/p>\n\n\n\n<p>A signed integral type which is identical to the difference type of iterator and 'const_iterator'.<\/p>\n\n\n\n<p><strong>3. typedef <\/strong>implementation-defined iterator;<\/p>\n\n\n\n<p>An iterator whose value type is the value_type.<\/p>\n\n\n\n<p>Any iterator category except output iterator.<\/p>\n\n\n\n<p>Convertible to const_iterator.<\/p>\n\n\n\n<p><strong>4. typedef <\/strong>implementation-defined const_iterator;<\/p>\n\n\n\n<p>A constant iterator whose value type is the value_type.<\/p>\n\n\n\n<p>Any iterator category except output iterator.<\/p>\n\n\n\n<p><strong>5. typedef<\/strong> implementation-defined local_iterator;<\/p>\n\n\n\n<p>An iterator with the same value type, difference type and pointer and reference type as an iterator.<\/p>\n\n\n\n<p>A local_iterator object could be used to iterate through a single bucket.<\/p>\n\n\n\n<p><strong>6. typedef<\/strong> implementation-defined const_local_iterator;<\/p>\n\n\n\n<p>A constant iterator with a similar value type, difference type and pointer and reference type as the const_iterator.<\/p>\n\n\n\n<p>A const_local_iterator object could be used to iterate through a single bucket.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"unordered_map-iterators\"><strong>Unordered_map iterators<\/strong><\/h2>\n\n\n\n<p>Iterators to elements of&nbsp;unordered_map&nbsp;containers access to both the&nbsp;key&nbsp;and the&nbsp;mapped value. For this, the class defines what is called its&nbsp;value_type, which is a&nbsp;pair&nbsp;class with its&nbsp;first&nbsp;value corresponding to the&nbsp;const&nbsp;version of the&nbsp;key&nbsp;type (template parameter&nbsp;Key) and its&nbsp;second&nbsp;value corresponding to the&nbsp;mapped value&nbsp;(template parameter&nbsp;T):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>&nbsp;<\/td><td>typedef pair&lt;const Key, T&gt; value_type;<\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li>iterator begin();<br>const_iterator begin() const;<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Returns:<\/td><td>An iterator that refers to the first element of the container or, if the box is empty, the past-the-end value for the container.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>iterator end();<br>const_iterator end() const;<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Returns:<\/td><td>An iterator referring to the past-the-end value for the container.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>const_iterator cbegin() const;<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Returns:<\/td><td>A constant iterator that refers to the first element of the container, or if the container is empty, the past-the-end value for the container.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>const_iterator cend() const;<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Returns:<\/td><td>A constant iterator referring to the past-the-end value for the container.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Iterators of a&nbsp;unordered_map&nbsp;container point to elements of this&nbsp;value_type. Thus, for an iterator called&nbsp;it&nbsp;that point to an element of a&nbsp;map, its key and mapped value can be accessed respectively with:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"member-types\"><strong>Member types<\/strong><\/h2>\n\n\n\n<p>The following aliases are member types of&nbsp;unordered_map. They are widely used as parameter and return types by member functions:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>member type<\/strong><\/td><td><strong>definition<\/strong><\/td><td><strong>notes<\/strong><\/td><\/tr><tr><td>key_type<\/td><td>the first template parameter (Key)<\/td><td><\/td><\/tr><tr><td>mapped_type<\/td><td>the second template parameter (T)<\/td><td><\/td><\/tr><tr><td>value_type<\/td><td>pair&lt;const key_type,mapped_type&gt;<\/td><td><\/td><\/tr><tr><td>hasher<\/td><td>the third template parameter (Hash)<\/td><td>defaults to:&nbsp;hash&lt;key_type&gt;<\/td><\/tr><tr><td>key_equal<\/td><td>the fourth template parameter (Pred)<\/td><td>defaults to:&nbsp;equal_to&lt;key_type&gt;<\/td><\/tr><tr><td>allocator_type<\/td><td>the fifth template parameter (Alloc)<\/td><td>defaults to:&nbsp;allocator&lt;value_type&gt;<\/td><\/tr><tr><td>reference<\/td><td>value_type&amp;<\/td><td><\/td><\/tr><tr><td>const_reference<\/td><td>const value_type&amp;<\/td><td><\/td><\/tr><tr><td>pointer<\/td><td>allocator_traits&lt;Alloc&gt;::pointer<\/td><td>for the default&nbsp;allocator:&nbsp;value_type*<\/td><\/tr><tr><td>const_pointer<\/td><td>allocator_traits&lt;Alloc&gt;::const_pointer<\/td><td>for the default&nbsp;allocator:&nbsp;const value_type*<\/td><\/tr><tr><td>iterator<\/td><td>a&nbsp;forward iterator&nbsp;to&nbsp;value_type<\/td><td><\/td><\/tr><tr><td>const_iterator<\/td><td>a&nbsp;forward iterator&nbsp;to&nbsp;const value_type<\/td><td><\/td><\/tr><tr><td>local_iterator<\/td><td>a&nbsp;forward iterator&nbsp;to&nbsp;value_type<\/td><td><\/td><\/tr><tr><td>const_local_iterator<\/td><td>a&nbsp;forward iterator&nbsp;to&nbsp;const value_type<\/td><td><\/td><\/tr><tr><td>size_type<\/td><td>an unsigned integral type<\/td><td>usually the same as&nbsp;size_t<\/td><\/tr><tr><td>difference_type<\/td><td>a signed integral type<\/td><td>usually the same as&nbsp;ptrdiff_t<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"container-properties-of-unordered_map\"><strong>Container Properties of unordered_map:<\/strong><\/h2>\n\n\n\n<p>Here are the container properties of unordered_map:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Allocator Aware: <\/strong>To dynamically handle its storage needs, the container uses an allocator object.<\/li><li><strong>Map:<\/strong> Every element associates a key to a particular mapped value. Keys help identify the elements whose main content is the mapped value. <\/li><li><strong>Unique keys:<\/strong> Every element in the container has a unique key. <\/li><li><strong>Associative:<\/strong> In the associative container, elements are referenced by their keys and not by absolute position in the container. <\/li><li><strong>Unordered:<\/strong> Elements are organized using hash tables in the unordered containers to allow faster access to elements by their key. <\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"methods-on-unordered_map\"><strong>Methods on unordered_map<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"member-function\"><strong>Member function<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>at() <\/strong>at() function in C++ unordered_map returns the reference to the value with the element as key k (public member function)<\/li><li><strong>operator[]<\/strong> Access element (public member function)<\/li><li><strong>begin()<\/strong> Returns an iterator that is pointing to the beginning in the container in the unordered_map container (public member function)<\/li><li><strong>end()<\/strong> Returns an iterator pointing to the end position past the last element in the container in the unordered_map container (public member function)<\/li><li><strong>cbegin() <\/strong>Return 'const_iterator' to beginning (public member function)<\/li><li><strong>cend()<\/strong> Return the const_iterator to end (public member function)<\/li><li><strong>bucket()<\/strong> Locate the bucket number where the element with the key k is placed in the map.(public member function)<\/li><li><strong>bucket_count ()<\/strong> this is used to count the total no. of buckets in an unordered_map. No parameter is required to pass into this function.(public member function)<\/li><li><strong>max_bucket_count()<\/strong> It returns the maximum number of bucket (public member function)<\/li><li><strong>bucket_size () <\/strong>Returns number of elements(bucket) in each bucket of the unordered_map. (public member function)<\/li><li><strong>count()<\/strong> Count number of elements present in an unordered_map with a specific key.(public member function)<\/li><li><strong>equal_range()<\/strong> Return bounds of a range that includes all elements in the container with a key that compares equal to k.(public member function)<\/li><li><strong>find()<\/strong> Return iterator to the element (public member function)<\/li><li><strong>emplace()<\/strong> Construct and insert an element (public member function )<\/li><li><strong>emplace_hint()<\/strong> Construct and insert element with 'hint' (public member function )<\/li><li><strong>insert() <\/strong>Insert elements (public member function )<\/li><li><strong>erase()<\/strong> Erase elements (public member function )<\/li><li><strong>clear()<\/strong> Clear content (public member function )<\/li><li><strong>swap()<\/strong> Clear content (public member function )<\/li><li><strong>load_factor()<\/strong> Return the load factor (public member function)<\/li><li><strong>max_load_factor()<\/strong> Get or set the maximum load factor (public member function )<\/li><li><strong>rehash()<\/strong> Set the number of buckets (public member function )<\/li><li><strong>reserve()<\/strong> Request for a capacity change (public member function)<\/li><li><strong>hash_function()<\/strong> Get the hash function (public member type)&nbsp;<\/li><li><strong>key_eq()<\/strong> Get the key equivalence predicate (public member type)<\/li><li>get_alloocator() Get allocator (public member function)<\/li><li><strong>empty()<\/strong> Test whether the container is empty (public member function)<\/li><li><strong>size()<\/strong> Return the container size (public member function)<\/li><li><strong>max_size() <\/strong>Return the maximum size (public member function)<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"non-member-function-overloads\"><strong>Non-Member function Overloads:<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>swap(unordered_map): <\/strong>This helps to exchange the contents of two unordered_map containers. <\/li><li><strong>operators(unordered_map)<\/strong>: Relational operators for the unordered_map.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"unordered_map-sample-code\"><strong>Unordered_map Sample Code<\/strong><\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/* m.cpp *\/\n#include &amp;lt;iostream&gt;\n#include &amp;lt;map&gt;\n#include &amp;lt;unordered_map&gt;\n#include &amp;lt;string&gt;\n\nusing namespace std;\n\nint main()\n{\n  map&amp;lt;unsigned long, string&gt; employer;\n  unordered_map&amp;lt;unsigned long, unsigned&gt; salary;\n\n  employer&#x5B;2014021701] = &quot;Gaurav&quot;;\n  employer&#x5B;2014021702] = &quot;Great Learning&quot;;\n\n  for(auto e: employer)\n    cout &amp;lt;&amp;lt; &quot;name: &quot; &amp;lt;&amp;lt; e.second\n          &amp;lt;&amp;lt; &quot;\\t id: &quot;  &amp;lt;&amp;lt; e.first &amp;lt;&amp;lt; endl;\n\n  unsigned total_payroll = 0;\n\n  salary&#x5B;2014021702] = 654321;\n  salary&#x5B;2014021701] = 123456;\n\n  for(auto s: salary)\n    total_payroll += s.second;\n\n  cout &amp;lt;&amp;lt; &quot;total payrolls $&quot; &amp;lt;&amp;lt; total_payroll &amp;lt;&amp;lt; endl;\n\n  return 0;\n}\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"unordered_map-vs-unordered_set\"><strong>unordered_map vs unordered_set<\/strong><\/h2>\n\n\n\n<p>The major difference between unordered_map and unordered_set is that, unordered_set does not support key values. There is only key in unordered_set. Whereas, in unordered_map we have key as well as its value. If there is situation or a problem where you have to count the individual frequencies of each tuple in a set, you will have to use unordered_map as the latter does not support it. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"unordered_map-vs-map\"><strong>unordered_map vs map<\/strong><\/h2>\n\n\n\n<p>As the name gives it away, there is an orderly arrangement of the elements in the map. In unordered_map, the keys are stored in any order. A map has a balanced tree structure implementation which is the reason it is possible to maintain order between elements. The average time complexity, however, for unordered_map operations is O(1) and O(log n) for map operations. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faqs\"><strong>FAQs<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"how-is-unordered_map-implemented-in-c\"><strong>How is Unordered_map implemented in C++?<\/strong><\/h3>\n\n\n\n<p>The unordered_map is implemented using hash tables in C++. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"is-unordered_map-faster-than-map\"><strong>Is Unordered_map faster than map?<\/strong><\/h3>\n\n\n\n<p>Generally, unordered_map is faster than map. But in some cases, map is faster. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"which-map-is-faster-in-c\"><strong>Which map is faster in C++?<\/strong><\/h3>\n\n\n\n<p>The unordered_map is the fastest in most of the cases in C++. The map however is faster in some of the cases. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-is-it-called-unordered_map\"><strong>Why is it called Unordered_map?<\/strong><\/h3>\n\n\n\n<p>It is called unordered_map because the elements stored here are in a random manner. There is no order in which the keys are stored and hence the name. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-does-unordered_map-return-c\"><strong>What does Unordered_map return C++?<\/strong><\/h3>\n\n\n\n<p>It returns a reference to the value that is mapped to a key that is equivalent to that key.<\/p>\n\n\n\n<p>This brings us to the end of the blog on the concept of unordered_map in C++. We hope that you found this comprehensive and helpful and were able to gain the required knowledge. If you wish to up-skill and learn more such concepts, you can&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.mygreatlearning.com\/academy\" target=\"_blank\">check out the pool of Free online courses at Great Learning Academy.<\/a><\/p>\n\n\n\n<p>Also, if you are preparing for Interviews, check out these&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.mygreatlearning.com\/blog\/cpp-interview-questions\/\" target=\"_blank\">Interview Questions for C++<\/a>&nbsp;to ace it like a pro.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>unordered_map C++ The unordered_map in C++ is like a data structure of dictionary type that store element. It has a sequence of (key, value) pair, which allows fast retrieval of an individual element based on their unique key. The function of each unique key is to hold only a single value associated with it, and [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":26651,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25860],"tags":[],"content_type":[],"class_list":["post-26162","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>unordered_map c++ - Everything you Need to know<\/title>\n<meta name=\"description\" content=\"unordered_map c++: The unordered_map in C++ has a sequence of (key, value) pair, which allows fast retrieval of an individual element based on their unique key.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"unordered_map in C++\" \/>\n<meta property=\"og:description\" content=\"unordered_map c++: The unordered_map in C++ has a sequence of (key, value) pair, which allows fast retrieval of an individual element based on their unique key.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-26T05:44:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-03T05:38:55+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"unordered_map in C++\",\"datePublished\":\"2021-03-26T05:44:00+00:00\",\"dateModified\":\"2024-09-03T05:38:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/\"},\"wordCount\":2113,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/shutterstock_1698488101.jpg\",\"articleSection\":[\"IT\\\/Software Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/\",\"name\":\"unordered_map c++ - Everything you Need to know\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/shutterstock_1698488101.jpg\",\"datePublished\":\"2021-03-26T05:44:00+00:00\",\"dateModified\":\"2024-09-03T05:38:55+00:00\",\"description\":\"unordered_map c++: The unordered_map in C++ has a sequence of (key, value) pair, which allows fast retrieval of an individual element based on their unique key.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/shutterstock_1698488101.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/shutterstock_1698488101.jpg\",\"width\":1000,\"height\":600,\"caption\":\"unordered_map C++\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/unordered_map-in-cpp\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IT\\\/Software Development\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/software\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"unordered_map in C++\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"unordered_map c++ - Everything you Need to know","description":"unordered_map c++: The unordered_map in C++ has a sequence of (key, value) pair, which allows fast retrieval of an individual element based on their unique key.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/","og_locale":"en_US","og_type":"article","og_title":"unordered_map in C++","og_description":"unordered_map c++: The unordered_map in C++ has a sequence of (key, value) pair, which allows fast retrieval of an individual element based on their unique key.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2021-03-26T05:44:00+00:00","article_modified_time":"2024-09-03T05:38:55+00:00","og_image":[{"width":1000,"height":600,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"unordered_map in C++","datePublished":"2021-03-26T05:44:00+00:00","dateModified":"2024-09-03T05:38:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/"},"wordCount":2113,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg","articleSection":["IT\/Software Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/","url":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/","name":"unordered_map c++ - Everything you Need to know","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg","datePublished":"2021-03-26T05:44:00+00:00","dateModified":"2024-09-03T05:38:55+00:00","description":"unordered_map c++: The unordered_map in C++ has a sequence of (key, value) pair, which allows fast retrieval of an individual element based on their unique key.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg","width":1000,"height":600,"caption":"unordered_map C++"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/unordered_map-in-cpp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"IT\/Software Development","item":"https:\/\/www.mygreatlearning.com\/blog\/software\/"},{"@type":"ListItem","position":3,"name":"unordered_map in C++"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg",1000,600,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101-300x180.jpg",300,180,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101-768x461.jpg",768,461,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg",1000,600,false],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg",1000,600,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg",1000,600,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg",640,384,false],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg",96,58,false],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2021\/03\/shutterstock_1698488101.jpg",150,90,false]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"unordered_map C++ The unordered_map in C++ is like a data structure of dictionary type that store element. It has a sequence of (key, value) pair, which allows fast retrieval of an individual element based on their unique key. The function of each unique key is to hold only a single value associated with it, and&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/26162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=26162"}],"version-history":[{"count":8,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/26162\/revisions"}],"predecessor-version":[{"id":84415,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/26162\/revisions\/84415"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/26651"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=26162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=26162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=26162"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=26162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}