Skip to content

Tag Archives: cpp-unordered_map

Unordered Map does not contain a hash function for a pair like it has for int, string, etc, So if we want to hash a… Read More
unordered_map is used to implement hash tables. It stores key value pairs. For every key, a hash function is computed and value is stored at… Read More
Given an array of N integers. Each element in the array occurs same number of times except one element. The task is to find this… Read More
Given a matrix mat consisting of * and lowercase English alphabets, the task is to find the character which has the maximum number of *… Read More
Given an array containing N distinct elements. There are M queries, each containing an integer X and asking for the index of X in the… Read More
Given a string. The task is to find the maximum occurred substring with a maximum length. These occurrences can overlap.Examples:  Input: str = "abab" Output:… Read More
Given an array of N positive numbers, the task is to find a contiguous subarray (L-R) such that a[L]=a[R] and sum of a[L] + a[L+1]… Read More
Given an array of N elements, the task is to check if the array has an element which is equal to the sum of all… Read More
Given two arrays A and B of positive integers, elements of array B can be mapped to elements of array A only if both the… Read More
Given an integer K and two arrays A1 and A2, the task is to return the total number of pairs (one element from A1 and… Read More
Given an array A[] of integers. The task is to find the total number of ordered pairs of positive integers (X, Y) such that X… Read More
Given a string. The task is to find the count of characters whose number of occurrences is prime. Examples:   Input : str = "geeksforgeeks" Output :… Read More
Given an array of integers, replace every element by its frequency in the array. Examples:  Input : arr[] = { 1, 2, 5, 2, 2,… Read More
Given an array of integers, find the k smallest numbers after deleting given elements. In case of repeating elements delete only one instance in the… Read More
Given an array of integers, find the k largest number after deleting the given elements. In case of repeating elements, delete one instance for every… Read More

Start Your Coding Journey Now!