## Construct a string that has exactly K subsequences from given string

Given a string str and an integer K, the task is to find a string S such that it has exactly K subsequences of given… Read More »

- How is the time complexity of Sieve of Eratosthenes is n*log(log(n))?
- Find the position of the given Prime Number
- Sum of product of proper divisors of all Numbers lying in range [L, R]
- Count of divisors of product of an Array in range L to R for Q queries
- Find all divisors of first N natural numbers
- Nodes with prime degree in an undirected Graph
- Count of all prime weight nodes between given nodes in the given Tree
- Print all Coprime path of a Binary Tree
- Count Sexy Prime Pairs in the given array
- Longest sub-array of Prime Numbers using Segmented Sieve
- Permutation of first N positive integers such that prime numbers are at prime indices | Set 2
- Count of pairs in an array whose product is a perfect square
- Find the row whose product has maximum count of prime factors
- Count of cells in a matrix whose adjacent cells's sum is prime Number
- Count of nodes in a Binary Tree whose child is its prime factors
- XOR of all Prime numbers in an Array at positions divisible by K
- Elements of Array which can be expressed as power of prime numbers
- Find pairs of elements from two different arrays whose product is a perfect square
- Count of Nodes which has Prime Digit sum weight in a Tree
- Minimum addition/removal of characters to be done to make frequency of each character prime
- Count of ways to represent N as sum of a prime number and twice of a square
- Find the number of ordered pairs such that a * p + b * q = N, where p and q are primes
- Count of pairs in an Array whose sum is Prime
- Sum of Maximum and Minimum prime factor of every number in the Array
- Count of Double Prime numbers in a given range L to R
- Count of primes after converting given binary number in base between L to R
- Construct a string that has exactly K subsequences from given string
- Count of subsequences of length atmost K containing distinct prime elements
- Print all possible pair with prime XOR in the Array
- Find all possible ways to Split the given string into Primes

Given a string str and an integer K, the task is to find a string S such that it has exactly K subsequences of given… Read More »

Given an array arr[] of N integers, and a range L to R, the task is to find the total number of elements in the… Read More »

Given two integers N and K, the task is to find the first element for every set of K consecutive elements which have exactly K… Read More »

Given an array arr[] containing repetitive prime and nonprime numbers, the task is to find the prime numbers occurring only once. Examples: Input: arr[] =… Read More »

Given a matrix mat[][] of R rows and C columns. The task is to find the sum of all elements from the main diagonal which… Read More »

Given an array of integers arr[], the task is to count the minimum number of changes required to convert each array element to its nearest… Read More »

Given two integers L and R, the task is to find the count of total numbers of prime numbers in the range [L, R] whose… Read More »

Given a number X, the task is to find the minimum number N such that the sum of the count of all factors from 1… Read More »

Given a matrix A[][] of size N*M, the task is to check if the given matrix satisfies the following two conditions or not: Sum of… Read More »

Given a string str that represents a number. The task is to find all possible ways to split the given string such that each segment… Read More »

Woodall Primes are prime numbers that are also Woodall number. Find the Woodall prime numbers less than N Given a number N, print all Woodall… Read More »

Brilliant Number is a number N which is product of two primes with same number of digits. Few Brilliant numbers are: 4, 6, 9, 10,… Read More »

Given a positive integer N, the task is to find the total number of distinct power of prime factor of the given number N. Examples:… Read More »

Given an integer array arr[] consisting of N integers, the task is to find the nearest Prime Number in the array for every element in… Read More »

Given a string S of length N, the task is to find the minimum operations required to make the frequency of every distinct character prime.… Read More »