## Check whether two strings are anagrams of each other using unordered_map in C++

Write a function to check whether two given strings are an Anagram of each other or not. An anagram of a string is another string… Read More »

## Find the difference of count of equal elements on the right and the left for each element

Given an array arr[] of size N. The task is to find X – Y for each of the element where X is the count… Read More »

## Find the smallest positive number missing from an unsorted array : Hashing Implementation

Given an unsorted array with both positive and negative elements including 0. The task is to find the smallest positive number missing from the array… Read More »

## Number of times the given string occurs in the array in the range [l, r]

Given an array of strings arr[] and two integers l and r, the task is to find the number of times the given string str… Read More »

## Maximum count of pairs which generate the same sum

Given an array arr[], the task is to count maximum count of pairs which give the same sum. Examples: Input: arr[] = {1, 2, 3,… Read More »

## Maximize the number of sum pairs which are divisible by K

Given an array of N integers and an integer K. The task is to print the maximum number of pairs(a[i]+a[j]) possible which are divisible by… Read More »

## Number of subarrays such that XOR of one half is equal to the other

Given an array of N numbers, the task is to find the number of sub-arrays (size of the sub-array should be an even number) of… Read More »

## Count of words that are present in all the given sentences

Given n sentences. The task is to count the number of words that appear in all of these sentences. Note that every word consists of… Read More »

## Find two numbers whose divisors are given in a random order

Given an array of N numbers which has all divisors of two numbers in any order. The task is to find the two numbers whose… Read More »

## unordered_map emplace() in C++ STL

The unordered_map::emplace() is a built-in function in C++ STL which inserts the key and its element in the unordered_map container. It effectively increases the container… Read More »

## Count pairs of parentheses sequences such that parentheses are balanced

Given N bracket sequences, the task is to find the number of pairs of bracket sequences by joining which can be obtained a balanced bracket… Read More »

## unordered_map cbegin in C++ STL

cbegin function in c++ is used to return a constant iterator pointing the first element in an unordered map. Syntax: unordered_map.cbegin() Parameter: It takes an… Read More »

## unordered_map size() in C++ STL

The unordered_multimap::size() is a built-in function in C++ Standard Template Library which return’s the number of element int the unordered map. Syntax: unordered_multimap_name.size() Return Value:… Read More »

## unordered_map find in C++ STL

find function in C++ is used to search for a specific key in an unordered map. Syntax unordered_map.find(key); Parameters: It takes the key as a… Read More »

## unordered_map erase in C++ STL

erase function is used to erase elements from the unordered_map. There are three type of erase functions supported by unordered_map : erasing by iterator: It… Read More »