Given a list of characters and an array of strings, find the total length of all strings in the array of strings that can be composed using the given characters.Examples:...
Given a string S consisting of characters 0, 1, and ‘?’, the task is to count all possible combinations of the binary string formed by replacing ‘?’ by 0 or 1....
Given an array of integers, remove all the occurrences of those elements which appear strictly more than k times in the array.Examples:...
Given an array arr[], integer M and an array query[] containing Q queries, the task is to find the query[i]th occurrence of Mth most frequent element of the array....
Given two arrays A[] and B[] consisting of N positive integers and an integer M, the task is to find the minimum value of X such that operation (A[i] + X) % M performed on every element of array A[] results in the formation of an array with frequency of elements same as that in another given array B[]....
Given a string S consisting of N lowercase characters, the task is to find the length of the longest substring consisting of each vowel an even number of times...
Given an integer array arr[] of size N and a positive integer K, the task is to count all the pairs in the array with a product equal to K....
Given an array arr[] consisting of N positive integers, the task is to count the number of pairs in the array, say (a, b) such that sum of a with its sum of digits is equal to sum of b with its sum of digits....
Given an array arr[] of size N, the task is to find the minimum increments by 1 required to be performed on the array elements such that the count of even and odd integers in the given array becomes equal. If it is not possible, then print “-1”....
Given a string S consisting of ‘X’, ‘Y’ and ‘Z’ only, the task is to convert S to a string consisting of only a single distinct character by selecting a character and removing substrings that does not contain that character, minimum number of times....
Given an array arr[] of N integers. The task is to find the number of index quadruples (i, j, k, l) such that a[i], a[j] and a[k] are in AP and a[j], a[k] and a[l] are in GP. All the quadruples have to be distinct.Examples:...
Given an array arr, the task is to find the sum of the elements which have prime frequencies in the array. Note: 1 is neither prime nor composite.Examples:...