# Tag Archives: cpp-unordered_set

Prerequisite: unordered_set() in C++ The max_bucket_count() is the built-in function defined in C++ STL. This function returns the maximum number of buckets that the Unordered… Read More
Given an array arr[] of size N, the task is to find the total number of unique pair sums possible from the array elements. Examples:… Read More
Ordered Set contains UNIQUE elements in sorted order just like set. While dealing with an ordered set with duplicate elements, the pair<int, int> data type… Read More
An unordered_set is an associated container available in the C++ Standard Template Library(STL) that is used for unique elements without any specific ordering, it internally… Read More
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :   Input : arr[] = { 2, 6,… Read More
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :   Input : arr[] = { 2, 6,… Read More
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :   Input : arr[] = { 2, 6,… Read More
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :   Input : arr[] = { 2, 6,… Read More
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :   Input : arr[] = { 2, 6,… Read More
What is a tuple? A tuple in C++ is an object which is used to group elements together. In a tuple, elements can be of… Read More
What is pair? Utility header in C++ provides us pair container. A pair consists of two data elements or objects.  The first element is referenced… Read More
What is an unordered set? In C++, an unordered set is an unordered container that can hold a number of unique elements. Unlike a set,… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More