## Smallest Greater (than S) String of length K whose letters are subset of S

Given a string S of length N consisting of lowercase English letters and an integer K. Find the lexicographically smallest string T of length K,… Read More »

- Set in C++ Standard Template Library (STL)
- Count number of triplets with product equal to given number with duplicates allowed | Set-2
- set find() function in C++ STL
- set::erase in C++ STL
- Smallest greater elements in whole array
- Binary Tree to Binary Search Tree Conversion using STL set
- Check if given Sudoku board configuration is valid or not
- Counting Inversions using Set in C++ STL
- Sorting array using Stacks
- set::begin() and set::end() in C++ STL
- set vs map in C++ STL
- set vs unordered_set in C++ STL
- set insert() function in C++ STL
- Count smaller elements on right side using Set in C++ STL
- Maximum Unique Element in every subarray of size K
- Minimum Possible value of |ai + aj - k| for given array and k.
- set lower_bound() function in C++ STL
- set count() function in C++ STL
- set::size() in C++ STL
- Numbers within a range that can be expressed as power of two numbers
- Print Binary Tree levels in sorted order | Set 2 (Using set)
- Subarray whose sum is closest to K
- Ordered Set and GNU C++ PBDS
- set::clear in C++ STL
- Print all distinct integers that can be formed by K numbers from a given array of N numbers
- Multi Source Shortest Path in Unweighted Graph
- set upper_bound() function in C++ STL
- C++ set for user define data type
- Queries to add, remove and return the difference of maximum and minimum.
- How to delete last element from a set in C++

Given a string S of length N consisting of lowercase English letters and an integer K. Find the lexicographically smallest string T of length K,… Read More »

Given a Set, the task is to remove the last element from this Set in C++. Examples: Input: set = [10 20 30 70 80… Read More »

Given a Set, the task is to traverse this Set in reverse order. Examples: Input: set = [10 20 30 70 80 90 100 40… Read More »

Given an array of integers, find the closest (not considering distance, but value) greater or same value on left of every element. If an element… Read More »

Given an integer and two arrays and , the task is to count the total pairs (formed after choosing an element from and another from… Read More »

Given an array with N distinct elements. The task is to find the minimum number of elements to be changed in the array such that,… Read More »

Given an array of integers ‘arr’, the task is to find the maximum XOR value of any triplet pair among all the possible triplet pairs.… Read More »

Given an array of size N and an integer K, find the minimum for each and every contiguous subarray of size K. Examples: Input :… 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 »

Sets are a type of associative containers in which each element has to be unique, because the value of the element identifies it. The value… Read More »

The set::get_allocator() in C++ STL is an in-built function which returns the copy of the allocator object associated with the set. Syntax: mulset.get_allocator(); Parameters: This… Read More »

The ‘=’ is an operator in C++ STL which copies (or moves) a set to another set and set::operator= is the corresponding operator function. There… Read More »

Given Q queries. The queries are of three types and are described below: Add the number num to the list. Remove the number num from… Read More »

Given a Bitonic sequence ‘S’ and ‘Q’ no. of queries. Each query contain an integer xi, 1 <= i <= Q. The task is to… 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 »