Skip to content

Tag Archives: cpp-set

Sets Sets are a type of associative container in which each element has to be unique because the value of the element identifies it. The… Read More
Priority Queues Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest of all… Read More
What is a tuple?A tuple is an object that can hold a number of elements. The elements can be of different data types. The elements… Read More
Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values… Read More
Given a queue consisting of the first N natural numbers and queries Query[][] of the type {E, X}, the task is to perform the given… Read More
An array is a collection of items stored at contiguous memory locations. It is to store multiple items of the same type together. This makes… Read More
A Set is a collection of distinct elements. Elements cannot be modified once added. There are various operations associated with sets such as union, intersection,… Read More
Given two arrays, A[] and B[] consisting of M pairs, representing the edges of the two binary trees of N distinct nodes according to the… Read More
Given N persons are standing in a circle and an integer K. If initially starting from the first position, the Kth alive person clockwise from… Read More
Given an array arr[] of size N, the task is to find the lexicographically smallest permutation of first 2*N natural numbers such that every ith… Read More
Given a string S consisting of N characters, the task is to print all palindromic strings of length 3 in lexicographical order that can be… Read More
Given a string path consisting of characters ‘N’, ‘S’, ‘E’ and ‘W’ denoting 1 unit movement in North, South, East, and West directions respectively, the… Read More
Given an array arr[] consisting of N distinct integers, the task is to print for each array element, all the greater elements present on its… Read More
Given a set S consisting of N integers and an element K, the task is to find the index of the element K in the… Read More
The find_by_order() is a built-in function of Ordered Set which is a Policy Based Data Structure in C++. Policy-based data structures are not part of… Read More

Start Your Coding Journey Now!