## 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 »

- Find the smallest positive number missing from an unsorted array | Set 3
- Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array
- Print combinations of distinct numbers which add up to give sum N
- Distinct pairs from given arrays (a[i], b[j]) such that (a[i] + b[j]) is a Fibonacci number
- Total distinct pairs from two arrays such that second number can be obtained by inverting bits of first
- Greatest number less than equal to B that can be formed from the digits of A
- Distinct state codes that appear in a string as contiguous sub-strings
- Find the Jaccard Index and Jaccard Distance between the two given sets

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 »