# Tag Archives: cpp-unordered_set

## Replace duplicates with greater than previous duplicate value

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 »

## Replace repeating elements with greater that greatest values

Given an integer array, if any integer is repeating then replace it with a number greater than that number which has not been inserted yet… Read More »

## Check if a pair with given product exists in Linked list

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 »

## Longest subarray with only one value greater than k

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 »

## Check if a pair with given absolute difference exists in a Matrix

Given a NxM matrix and a difference K. The task is to check if a pair with the given absolute difference exists in the matrix… Read More »

## Check if a pair with given product exists in a Matrix

Given a 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 »

## Pair with given sum in matrix

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 »

## unordered_set operator!= in C++ STL

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 »

## unordered_set key_eq() function in C++ STL

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 »

## unordered_set == operator in C++ STL

The ‘==’ is an operator in C++ STL performs equality comparison operation between two unordered sets and unordered_set::operator== is the corresponding operator function for the… Read More »

## unordered_set emplace_hint() function in C++ STL

The unordered_set::emplace_hint() function is an inbuilt function in C++ STL which inserts a new element in the unordered_set only if the value to be inserted… Read More »

## unordered_set max_load_factor() in C++ STL

unordered_set::max_load_factor() is a function in C++ STL which returns(Or sets) the current maximum load factor of the unordered set container. The load factor is the… Read More »

## unordered_set swap() in C++ STL

The swap() method of “unordered_set” swaps the contents of two containers. It is public member function. This function: Exchanges the content of the container by… Read More »

## unordered_set end() in C++ STL

The unordered_set::end() function is a built-in function in C++ STL which returns an iterator pointing to the past-the-end-element. This iterator does not directly point to… Read More »

## unordered_set insert() function in C++ STL

The unordered_set::insert() is a built-in function in C++ STL which is used to insert a new {element} in the unordered_set container. Each element is inserted… Read More »