Skip to content

Tag Archives: cpp-unordered_map

Given an array of integers containing duplicate elements. The task is to find the sum of all highest occurring elements in the given array. That… Read More
Given an array of integers containing duplicate elements. The task is to find the sum of all least occurring elements in the given array. That… Read More
The unordered_map::equal_range() is an inbuilt function in C++ STL which is used to return the bounds of a range that includes all the elements in… Read More
Given N numbers, the task is to find the minimum removal of numbers such that the GCD of the remaining numbers is greater than the… Read More
Given an integer . The task is to find all factors of N and print the product of four factors of N such that:   Sum of… Read More
Given N ranges and Q queries consisting of numbers. Every range consists of L and R. The task is to check if the given number… Read More
Suppose you are given an array with N elements with any integer values. You need to find the minimum number of elements of the array… Read More
Given an array of integers. Let us say P is the product of elements of the array. Find the number of distinct prime factors of… Read More
Given an array arr[] containing n integers. The problem is to find the length of the subarray having maximum sum. If there exists two or… Read More
Given an array arr that has numbers appearing twice or once. The task is to identify numbers that occur only once in the array.  Note:… Read More
Given a tree of N nodes and N-1 edges. Also given an integer M and a node, the task is to print the M-th node… Read More
Given an array arr[] of integers and a number . You can change any element of the array to an integer. The task is to find the… Read More
Given an array of N elements, print the elements in the same relative order as given by removing all the occurrences of elements except the… Read More
Measuring the frequency of elements in an array is a really handy skill and is required a lot of competitive coding problems. We, in a lot… Read More
Given an array which may contain duplicates, print all elements and their frequencies. Examples:  Input : arr[] = {10, 20, 20, 10, 10, 20, 5,… Read More

Start Your Coding Journey Now!