Skip to content

Tag Archives: cpp-unordered_map

Given two arrays (which may or may not be sorted). These arrays are such that they might have some common elements in them. We need… Read More
Given an integer array, print all repeating elements (Elements that appear more than once) in the array. The output should contain elements according to their… Read More
Given a binary search tree of n nodes with distinct values. Also given are Q queries. Each query consists of a node value that has… Read More
Given two arrays A[] and B[] having n unique elements each. The task is to find the overlapping sum of the two arrays. That is… Read More
Given N rows with M elements each and an array arr[] of L numbers, the task is to print the count of elements of that… Read More
Given an unsorted array a[] of size n and an integer d which is the common difference, the task is to find the length of… Read More
Unlike a set, a multiset may contain multiple occurrences of same number. The multiset equivalence problem states to check if two given multisets are equal… Read More
Given two strings S1 and S2(all characters are in lower-case). The task is to check if S2 can be formed from S1 using given constraints: 1.… Read More
The unordered_map::begin() is a built-in function in C++ STL which returns an iterator pointing to the first element in the unordered_map container or in any… Read More
The unordered_map::bucket() is a built-in STL function in C++ which returns the bucket number where the element with the key k is located in the… Read More
Given an array of n-positive elements. The sub-array sum is defined as the sum of all elements of a particular sub-array, the task is to… Read More
Given n elements, write a program that prints the longest increasing subsequence whose adjacent element difference is one. Examples:   Input : a[] = {3, 10, 3,… Read More
Given N elements, write a program that prints the length of the longest increasing subsequence whose adjacent element difference is one. Examples:  Input : a[] =… Read More
Prerequisite : Unordered maps in STLUnordered_map : unordered_map is an associated container that stores elements formed by the combination of key value and a mapped… Read More
Given an array of n integers, slope of a line i. e., m and the intercept of the line i.e c, Count the number of… Read More

Start Your Coding Journey Now!