Set

Hi everyone In this tutorial we will talk about Set So, What is Set actually? Set is an associative container of C++ STL that stores only unique elements. Each element inside a set is a key — there are no associated values (that is the job of map). The elements are always kept sorted in […]

Set Read More »

Array

Hi everyone In this tutorial we will talk about Array So, What is Array actually? Array is a sequential container of C++ STL that wraps a fixed-size contiguous array. The size of an array is decided at compile time and cannot be changed once the array is declared. We all know the classic C-style array

Array Read More »

Flat Multimap

Hi everyone In this tutorial we will talk about Flat Multimap So, What is Flat Multimap actually? Flat Multimap is an associative container of C++ STL that stores data in key–value pairs. It is basically a combination of two containers we already know — From flat_map, it takes the cache-friendly layout — two parallel sorted

Flat Multimap Read More »

Flat Map

Hi everyone In this tutorial we will talk about Flat Map So, What is Flat Map actually? Flat Map is an associative container of C++ STL that stores data in key–value pairs, just like map. Each key inside a flat map is unique, and the elements are kept sorted by key automatically. From the outside,

Flat Map Read More »

Unordered Multimap

Hi everyone In this tutorial we will talk about Unordered Multimap So, What is Unordered Multimap actually? Unordered Multimap is an associative container of C++ STL that stores data in key–value pairs. It is basically a combination of two containers we already know — From unordered_map, it takes the hash table backing and the fast

Unordered Multimap Read More »

Multimap

Hi everyone In this tutorial we will talk about Multimap So, What is Multimap actually? Multimap is an associative container of C++ STL that stores data in key–value pairs, just like map. The elements are kept sorted by key automatically. The one big difference from map is that multimap allows duplicate keys. The same key

Multimap Read More »

Unordered Map

Hi everyone In this tutorial we will talk about Unordered Map So, What is Unordered Map actually? Unordered Map is an associative container of C++ STL that stores data in key–value pairs, just like map. Each key inside an unordered map is unique, and we access values using their keys. The big difference from map

Unordered Map Read More »

Map

Hi everyone In this tutorial we will talk about Map So, What is Map actually? Map is an associative container of C++ STL that stores data in key–value pairs. Each key inside a map is unique, and the elements are always kept sorted by key automatically. Unlike vector or list, where we access elements by

Map Read More »

Pair

Hi everyone In this tutorial we will talk about Pair So, What is Pair actually? Pair is a simple container that stores two values (which may be of different data types) together as a single unit. The two values are stored side by side and can be accessed individually using .first and .second. Pair is

Pair Read More »

Priority Queue

Hi everyone In this tutorial we will talk about Priority Queue So, What is Priority Queue actually? Priority Queue is a special type of queue where each element has a priority associated with it. Elements with higher priority are served before elements with lower priority, regardless of their insertion order. STL Priority Queue also works

Priority Queue Read More »