Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
C C++ computer-graphics

Code to generate the map of India (with explanation)

Given a obfuscated code that generates the map of India, explain its working. The following code when executed generates the map of India – #include "stdi...
C++ cpp-map cpp-unordered_map

Check if a key is present in a C++ map or unordered_map

A C++ map and unordered_map are initialized to some keys and their respective mapped values. Examples: Input : Map : 1 -> 4, 2 -> 6, 4 -> 6 Check1 : 5, Che...
C++ cpp-pair STL

Map of pairs in STL

Map in STL is used to hash key and value. We generally see map being used for standard data types. We can also use map for pairs. For example consider a simple proble...
C++ CPP-Library cpp-unordered_map

bucket_count and bucket_size in unordered_map in C++

as we know, internally unordered_map is implemented using hash table so, a bucket is a slot in the internal hash Table to which elements are assigned based on the has...
C++ Difference Between cpp-map

map vs unordered_map in C++

Pre-requisite : std::map, std::unordered_map When it comes to efficiency, there is a huge difference between maps and unordered maps. We must know the internal workin...
C++ cpp-containers-library cpp-map

Map in C++ Standard Template Library (STL)

Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values can have same key valu...
C++ STL STL

Descending order in Map and Multimap of C++ STL

We have discussed map in C++ STL and multimap in C++ STL. The default behavior of these data structures is to store elements in ascending order. How to ensure revers...
C++ cpp-containers-library CPP-Library

unordered_map in C++ STL

unordered_map is an associated container that stores elements formed by combination of key value and a mapped value. The key value is used to uniquely identify the el...
C C++ cpp-containers-library

unordered_multimap and its application

Allows Duplicates: We have discussed about unordered_map in our previous post , but there is a limitation, we can not store duplicates in unordered_map, that is if we...
C++ CPP-Functions cpp-map

map emplace() in C++ STL

The map::emplace() is a built-in function in C++ STL which inserts the key and its element in the map container. It effectively increases the container size by one. I...

Subscribe to Our Newsletter