Skip to content

Tag Archives: cpp-map

Given an array of positive numbers arr[] and integer K. You have to choose the maximum number possible from left to right such that each… Read More
Given two strings A and B of lowercase English letters of lengths N and M respectively. Check whether the number of distinct characters in both… Read More
Prerequisites: Functions in C++ Map in C++ Maps in C++ are a very useful data structure for storing key-value pairs. A map is the best… Read More
Prerequisites: Structure in C++ Vector in C++ A structure is a user-defined data type that groups together related data items of different data types. Structures… Read More
Design a simplified version of Twitter where users can post tweets, follow/unfollow another user, and see the 10 most recent tweets in their news feed. … Read More
Prerequisite: Maps Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two… Read More
Prerequisite:  Maps in C++ STL  Pass by reference Elements in the map are in form of pairs where the first is key and another value,… Read More
C++ Map is another commonly used STL container, it stores elements in a mapped fashion. Each element is stored as a pair having a key… Read More
Prerequisites: Map in C++ STL Since the map is not indexed as arrays or vectors sequential access is not possible in the map but to… Read More
Given a positive integer array jobs[] and positive integer K, jobs[i] represent the type of the ith job and K represents the minimum number of… Read More
Given an array arr[] of size N, the task is to count all pair of indices (i, j) such that i < j and j… Read More
Given an array arr[] of size N, the task is to find the minimum number of jumps to reach the last index of the array… Read More
Given two arrays, A[] and B[], the task is to check if they are equal or not. Arrays are considered equal if any permutation of… Read More
What is a Map? Before learning the data structure used by a map, let us have an overlook of map. Map is the part of… Read More
Given an array arr[] containing N email addresses with different domains, the task is to find the unique domains and their frequencies from the list… Read More