Skip to content

Tag Archives: cpp-unordered_set

Given an array of N elements, the task is to find all the unique pairs that can be formed using the elements of a given… Read More
Given an unsorted array arr[] of length N, The task is to count all distinct elements in arr[]. Examples:  Input :   arr[] = {10,… Read More
Given an array arr[] and an integer K. The task is to find the size of the maximum sub-set such that every pair from the… Read More
The unordered_set internally implements a hash table to store elements. By default we can store only predefined type as int, string, float etc. If we want… Read More
Given an array of N elements, the task is to check if the array has an element which is equal to the product of all… Read More
Given a sorted array (with unique entries), we have to find whether there exists an element(say X) that is exactly half the sum of all… Read More
Given an array of elements and change the array in such a way that all the elements on the array are distinct. If you are… Read More
Given an integer array, if an integer is repeating then replace it with a number greater than that number that has not been inserted yet… Read More
Given a linked list, and a product K. The task is to check if there exist two numbers in the linked list whose product is… Read More
Given an array of N numbers, find length of the longest subarray such that K is the second largest element on insertion.  Examples:  Input: a[]… Read More
Given an N×M matrix and a difference K. The task is to check if a pair with the given absolute difference exists in the matrix… Read More
Given an NxM matrix and a product K. The task is to check if a pair with the given product exists in the matrix or… Read More
Given a NxM matrix and a sum S. The task is to check if a pair with given Sum exists in the matrix or not.… Read More
The != is a relational operator in C++ STL which compares the equality and inequality between unordered_set containers. The Comparison is done in the following… Read More
The unordered_set key_eq() is a built-in function in C++ STL which returns a boolean value according to the comparison. It returns the key equivalence comparison… Read More

Start Your Coding Journey Now!