Skip to content

Tag Archives: cpp-unordered_map

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 product… 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
The unordered_map::end() is a built-in function in C++ STL which returns an iterator pointing to the position past the last element in the container in… Read More
Given an array of positive integers(may contain duplicates) and a number ‘m’, find the number of unordered triplets ((Ai, Aj, Ak) and (Aj, Ai, Ak)… Read More
Given a binary tree, find the maximum vertical level sum in binary tree. Examples:  Input : 3 / \ 4 6 / \ / \… Read More

Start Your Coding Journey Now!