Skip to content

Tag Archives: cpp-unordered_map

Given an array A[] of size N, the task is to maximize the frequency of any element by adding any positive integer X to all… Read More
Given two arrays arr1[] and arr2[] of length N and M respectively, the task is to check if the two arrays are equal or not. … Read More
Given two snapshots S1 and S2 of N elements, the task is to find the elements which are changing their groups and the ones that… Read More
Given an array arr[] of size N and three integers X, Y and K, the task is to count the number of pairs (i, j)… Read More
Given a 3D array of size N*M*P consisting only of English alphabet characters, the task is to print the frequency of all the elements in… Read More
unordered_map is an associated container available in the C++ Standard Template Library(STL) that is used to store key-value pairs. It internally uses the working principle… Read More
Given an integer array arr[] and a positive integer K, the task is to count all distinct pairs with differences equal to K. Examples: Input:… Read More
Given an array A[] having N positive integers, the task is to perform the following operations and maximize the sum obtained while reducing the array:… Read More
Given an array arr[] containing positive integers, count the total number of pairs for which arr[i]+i = arr[j]+j such that 0≤i<j≤n-1. Examples: Input: arr[] =… Read More
Given an array arr[] of N integers and an array query[] having Q integers, the task is to print the array arr[] after moving the… Read More
What is an array? An array in any programming language is a data structure that is used to store elements or data items of similar… Read More
Forward List Forward list in STL implements singly linked list. Introduced from C++11, forward lists are more useful than other containers in insertion, removal, and… Read More
Tuple – A tuple is an object that can hold a number of elements. The elements can be of different data types. The elements of… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum element with the minimum frequency. Examples: Input: arr[] = {2,… Read More
Given an array arr[] consisting of N positive integers, the task is to count the number of pairs in the array, say (a, b) such… Read More

Start Your Coding Journey Now!